Compile UE4 on Linux

Hello, Im trying to install Unreal Engine 4 on Linux (Debian 9), after command “make” (according this tutorial) I get this error (UE4Editor wasn’t created):

root@Andromeda:/home/tomsk/UnrealEngine# make
bash "/home/tomsk/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh" CrashReportClient Linux Shipping  
Building CrashReportClient...
Using clang version '3.9.1' (string), 3 (major), 9 (minor), 1 (patch)
Creating makefile for CrashReportClient (no existing makefile)
Performing full C++ include scan (no include cache file)
Building UnrealHeaderTool...
Using clang version '3.9.1' (string), 3 (major), 9 (minor), 1 (patch)
Target is up to date
Total build time: 0.31 seconds (NoActionsToExecute executor: 0.00 seconds)
Parsing headers for CrashReportClient
  Running UnrealHeaderTool CrashReportClient "/home/tomsk/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -NoEnginePlugins
Refusing to run with the root privileges.
Error: UnrealHeaderTool failed for target 'CrashReportClient' (platform: Linux, module info: /home/tomsk/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest, exit code: Canceled (1)).
Makefile:257: recipe for target 'CrashReportClient-Linux-Shipping' failed
make: *** [CrashReportClient-Linux-Shipping] Error 1

Creash Report: /home/tomsk/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/CrashReportClient.uhtmanifest

Without root:

 tomsk@Andromeda:~/UnrealEngine$ make
    bash "/home/tomsk/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh" CrashReportClient Linux Shipping  
    /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Access to the path "/home/tomsk/UnrealEngine/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.csproj.FilesWrittenAbsolute.txt" is denied.  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
      at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
      at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00022] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00061] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <8f2c484307284b51944a1a13a14c0266>:0 
      at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
      at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x00034] in <063b27d92e604f699a7eab9b5479d82b>:0 
    /usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Access to the path "/home/tomsk/UnrealEngine/Engine/Source/Programs/UnrealBuildTool/obj/Development/UnrealBuildTool.csproj.FilesWrittenAbsolute.txt" is denied.  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
      at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
      at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00022] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00061] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <8f2c484307284b51944a1a13a14c0266>:0 
      at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
      at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x00034] in <063b27d92e604f699a7eab9b5479d82b>:0 
    Failed to build to build tool (UnrealBuildTool)
    Makefile:257: recipe for target 'CrashReportClient-Linux-Shipping' failed
    make: *** [CrashReportClient-Linux-Shipping] Error 1

Please how to solve it?

UPDATE

If I run ./Setup.sh and ./GenerateProjectFiles.sh as root and then make as normal user I get:

tomsk@Andromeda:~/UnrealEngine$ make
bash "/home/tomsk/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh" CrashReportClient Linux Shipping  
/usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Access to the path "/home/tomsk/UnrealEngine/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.csproj.FilesWrittenAbsolute.txt" is denied.  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00022] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00061] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <8f2c484307284b51944a1a13a14c0266>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x00034] in <063b27d92e604f699a7eab9b5479d82b>:0 
/usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Access to the path "/home/tomsk/UnrealEngine/Engine/Source/Programs/UnrealBuildTool/obj/Development/UnrealBuildTool.csproj.FilesWrittenAbsolute.txt" is denied.  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00022] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00061] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <8f2c484307284b51944a1a13a14c0266>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x00034] in <063b27d92e604f699a7eab9b5479d82b>:0 
Failed to build to build tool (UnrealBuildTool)
Makefile:257: recipe for target 'CrashReportClient-Linux-Shipping' failed
make: *** [CrashReportClient-Linux-Shipping] Error 1

Hey t0msk-

Building the engine in the root is expected to fail because building/installing the engine there could have affects on other files. After attempting to build in the root location, did you rerun ./Setup.sh & ./GenerateProjectFiles.sh from whatever new location you were installing to? Additionally, if you continue running into problems after changing the default path of the engine, please try using Clang 3.8.

Cheers

If I run it as normal user I get an error:

tomsk@Andromeda:~/UnrealEngine$ ./Setup.sh
Registering git hooks... (this will override existing ones!)
./Setup.sh: line 30: .git/hooks/post-checkout: Permission denied

Solved it, problem was that my files/folders in UnrealEngine directory had “root” owner and group, so I changed it to “tomsk” using command chown -R and it is compiling now :slight_smile:

This worked!! Thanks

@ t0msk please how did you do that ?I am also having the same error . I try but it is not working for me . please can you show the steps and graphic on how you did that let me see if am doing the right thing. thank you .