重新编译 Unity 时出错:X 服务器无法及时运行

重新编译 Unity 时出错:X 服务器无法及时运行

我正在尝试在 Ubuntu 16 中禁用 Unity 中的内置多点触摸手势。显然,这需要编辑 Unity 源代码。我偶然发现了这篇文章,解释了如何操作:https://askubuntu.com/a/205045/683695

我在编译 Unity 时遇到错误dpkg-buildpackage -us -uc -nc

Scanning dependencies of target run-test-switcher-controller-slow-headless
make[5]: Leaving directory '/tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu'
make -f tests/CMakeFiles/run-test-switcher-controller-slow-headless.dir/build.make tests/CMakeFiles/run-test-switcher-controller-slow-headless.dir/build
make[5]: Entering directory '/tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu'
cd /tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu/tests && env NUX_FALLBACK_TEXTURE=TRUE /tmp/unity/unity-7.4.5+16.04.20180221/tests/dummy-xorg-test-runner.sh /usr/bin/dbus-run-session ./test-switcher-controller-slow --gtest_output=xml:/tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu/tests/test-switcher-controller-slow-headless.xml
The X server was not able to run in time
tests/CMakeFiles/run-test-switcher-controller-slow-headless.dir/build.make:60: recipe for target 'tests/CMakeFiles/run-test-switcher-controller-slow-headless' failed
make[5]: *** [tests/CMakeFiles/run-test-switcher-controller-slow-headless] Error 1
make[5]: Leaving directory '/tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu'
CMakeFiles/Makefile2:20125: recipe for target 'tests/CMakeFiles/run-test-switcher-controller-slow-headless.dir/all' failed
make[4]: *** [tests/CMakeFiles/run-test-switcher-controller-slow-headless.dir/all] Error 2
make[4]: Leaving directory '/tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu'
CMakeFiles/Makefile2:24011: recipe for target 'tests/CMakeFiles/check-headless.dir/rule' failed
make[3]: *** [tests/CMakeFiles/check-headless.dir/rule] Error 2
make[3]: Leaving directory '/tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu'
Makefile:7848: recipe for target 'check-headless' failed
make[2]: *** [check-headless] Error 2
make[2]: Leaving directory '/tmp/unity/unity-7.4.5+16.04.20180221/obj-x86_64-linux-gnu'
debian/rules:58: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 2
make[1]: Leaving directory '/tmp/unity/unity-7.4.5+16.04.20180221'
debian/rules:63: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

答案1

我意识到错误发生在单元测试阶段。因此,我没有进行单元测试就进行了编译,并成功了:

DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -nc

相关内容