安装虚幻引擎 4 时出错

安装虚幻引擎 4 时出错

在笔记本电脑上安装 UE4 时 RAM 8GB CPU i7-3720QM 显卡 Nvidia Quadro K1000M

在终端输入:

sudo make UE4Editor UE4Game UnrealPak CrashReportClient ShaderCompileWorker UnrealLightmass

输出:

bash "/home/nguyenkhacthanh/Desktop/UnrealEngine-release/Engine/Build/BatchFiles/Linux/Build.sh" UE4Editor Linux Development  
Building UE4Editor...
Using clang version '3.8.0' (string), 3 (major), 8 (minor), 0 (patch)
Creating makefile for UE4Editor (no existing makefile)
Performing full C++ include scan (no include cache file)
Building UnrealHeaderTool...
Using clang version '3.8.0' (string), 3 (major), 8 (minor), 0 (patch)
Creating makefile for UnrealHeaderTool (no existing makefile)
Using bundled libc++ standard C++ library.
Target is up to date
Parsing headers for UE4Editor
  Running UnrealHeaderTool UE4Editor "/home/nguyenkhacthanh/Desktop/UnrealEngine-release/Engine/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/UE4Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors
Refusing to run with the root privileges.
Error: UnrealHeaderTool failed for target 'UE4Editor' (platform: Linux, module info: /home/nguyenkhacthanh/Desktop/UnrealEngine-release/Engine/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/UE4Editor.uhtmanifest, exit code: Canceled (1)).
Makefile:183: recipe for target 'UE4Editor' failed
make: *** [UE4Editor] Error 1

答案1

您不需要 root 权限即可制作虚幻引擎 4。

首先你必须在终端中输入以下内容:

./Setup.sh

然后:

./GenerateProjectFiles.sh

然后输入不带选项或参数的命令:

make

构建类型后

make ARGS=-clean

自动清理任何构建目标。

答案2

在我的例子中,UnrealEngine 目录归 root 所有,因此make由于权限问题而失败,并sudo make拒绝按上述方式运行。解决方案是将所有者更改为我自己,如同

sudo chown -R $USER <UE directory>

然后运行make

相关内容