You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Unreal Engine 5.1自定义Docker镜像构建失败求助

Unreal Engine 5.1 Docker镜像构建失败排查与解决

问题概述

基于官方UE5.1完整副本构建Docker容器镜像时失败,核心报错为COULDN'T load dxcompiler,同时伴随libxkbcommon.so.0缺失警告。5.0版本可正常构建,5.1版本无论自定义还是官方仓库均出现相同问题。

复现步骤

  • 克隆UE仓库:git clone -b release --single-branch git@github.com:EpicGames/UnrealEngine.git
  • 执行Setup.sh
  • 执行GenerateProjectFiles.sh
  • 运行构建命令:./build branchname repourl

关键报错日志

#22 14630.5 LogCore: Warning: dlopen failed: libxkbcommon.so.0: cannot open shared object file: No such file or directory
#22 14630.6 libc++abi: terminating with uncaught exception of type std::runtime_error: COULDN'T load dxcompiler.
#22 14630.6 Signal 6 caught

解决方案

1. 补充系统依赖库

构建镜像的基础系统缺少libxkbcommon,在Dockerfile中添加对应安装命令:

  • Debian/Ubuntu系:
    apt-get update && apt-get install -y --no-install-recommends libxkbcommon0
    
  • RHEL/CentOS系:
    yum install -y libxkbcommon
    

2. 修复dxcompiler依赖

UE5.1对DirectX编译器的依赖逻辑有调整,需确保:

  • 重新运行Setup.sh,确认第三方依赖包完整下载,检查Engine/Binaries/ThirdParty/DirectX/Linux/x86_64目录下存在libdxcompiler.so
  • 在Docker构建环境中,将该路径加入LD_LIBRARY_PATH:
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/UE/Engine/Binaries/ThirdParty/DirectX/Linux/x86_64"
    

3. 适配UE5.1构建脚本

UE5.1相比5.0在容器构建流程上有细节变化,需:

  • 确认构建命令使用正确的目标平台参数(如-targetplatform=Linux)
  • 检查构建脚本是否遗漏5.1新增的依赖处理步骤,可参考同版本官方容器构建说明调整

内容的提问来源于stack exchange,提问作者Fragile

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 20:55:51