Error trying to make an Installed Build with Linux Server option

Hi everyone,
I am trying to build an Installed Build from UE4 source code but it keeps giving me this error (always the same file):

SafeCopyFile Exception was Exception in mscorlib: Could not find a part of the path ‘XXX\LocalBuilds\Engine\Windows\Engine\Plugins\Runtime\OptionalMobileFeaturesBPLibrary\Intermediate\Build\Linux\B4D820EA\UE4Server\Development\OptionalMobileFeaturesBPLibrary\Module.OptionalMobileFeaturesBPLibrary.gen.cpp.o’.
I am trying to build for Win64 and Linux for dedicated server. This is the command line:
“XXX\Engine\Build\BatchFiles\RunUAT.bat” BuildGraph -target=“Make Installed Build Win64” -script=Engine/Build/InstalledEngineBuild.xml -set:VS2019=true -set:WithWin64=true -set:WithLinux=true -set:WithServer=true -set:WithFullDebugInfo=true -set:WithDDC=false -set:HostPlatformDDCOnly=true -set:GameConfigurations=DebugGame;Development;Shipping -set:WithWin32=false -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithLinuxAArch64=false -set:WithLumin=false -set:WithLuminMac=false -set:WithHoloLens=false

I happens when compiling for Linux Server (I need it for dedicated linux server)
Anyone knows why I am having this error and how to fix it?

Thanks for any help!

Not sure if you solved this, but I ran into the same thing and I believe it is because the path is too long - mine was over 255 characters. Change your root directory to be as low as level to the drive as possible (ie. C:\UE4) and you should be able to get past this error.

The way I “fixed” it was just compiling from the simple config (just Window64 and Development) and start adding configurations: Server, Linux, Debug, Test…
At some point it stopped of giving me that error.
Anyway, I will try your suggestion.
Thank you very much!