0

我使用的是 Ubuntu 12.04,尝试了 32 位和 64 位版本

这是我尝试构建 xtk 时得到的。请帮助如何解决问题

george@laptop-4:~/X4/utils$ ./build.py -b -t -e
*------------------------*
编译代码
 /home/george/X4/lib/closure-library/closure/bin/build/closurebuilder.py:扫描路径...
 /home/george/X4/lib/closure-library/closure/bin/build/closurebuilder.py:扫描了 936 个源。
 /home/george/X4/lib/closure-library/closure/bin/build/closurebuilder.py:构建依赖树..
回溯(最近一次通话最后):
文件“/home/george/X4/lib/closure-library/closure/bin/build/closurebuilder.py”,第 256 行,在
主要的()
文件“/home/george/X4/lib/closure-library/closure/bin/build/closurebuilder.py”,第 241 行,在 main
options.compiler_flags)
编译中的文件“/home/george/X4/lib/closure-library/closure/bin/build/jscompiler.py”,第 50 行
如果不是 (distutils.version.LooseVersion(_GetJavaVersion()) >=
_GetJavaVersion 中的文件“/home/george/X4/lib/closure-library/closure/bin/build/jscompiler.py”,第 31 行
proc = subprocess.Popen(['java', '-version'], stderr=subprocess.PIPE)
文件“/usr/lib/python2.7/subprocess.py”,第 679 行,在 __init__
读错,写错)
_execute_child 中的文件“/usr/lib/python2.7/subprocess.py”,第 1249 行
引发 child_exception
OSError: [Errno 2] 没有这样的文件或目录
>> 输出:xtk.js
代码编译
*------------------------*
*------------------------*
测试代码

======== 谷歌浏览器结果 ========
回溯(最近一次通话最后):
  文件“./build.py”,第 177 行,在
    scripts.test.calculate(paths.xtkDir + '/testing/xtk_tests_build.html', paths.xtkLibDir)
  文件“/home/george/X4/utils/scripts/test.py”,第 60 行,在计算中
    显示=显示(可见=0,大小=(1024,768))
  文件“/home/george/X4/lib/PyVirtualDisplay/build/lib.linux-x86_64-2.7/pyvirtualdisplay/display.py”,第 33 行,在 __init__
    self._obj = self.display_class(
  文件“/home/george/X4/lib/PyVirtualDisplay/build/lib.linux-x86_64-2.7/pyvirtualdisplay/display.py”,第 51 行,在 display_class
    cls.check_installed()
  文件“/home/george/X4/lib/PyVirtualDisplay/build/lib.linux-x86_64-2.7/pyvirtualdisplay/xvfb.py”,第 33 行,在 check_installed
    EasyProcess([程序, '-help'], url=URL, ubuntu_package=PACKAGE).check_installed()
  文件“/home/george/X4/lib/EasyProcess/build/lib.linux-x86_64-2.7/easyprocess/__init__.py”,第 201 行,在 check_installed
    引发 EasyProcessCheckInstalledError(self)
easyprocess.EasyProcessCheckInstalledError: cmd=['Xvfb', '-help']
OSError=[Errno 2] 没有这样的文件或目录  
程序安装错误!
您可以在终端中安装它:
sudo apt-get install xvfb
4

1 回答 1

1

我还在我的 Ubuntu 下进行了测试,并且遇到了同样的错误并解决了它(顺便说一句编译成功,但之后我没有尝试 lib)

查看错误的结尾:

easyprocess.EasyProcessCheckInstalledError: cmd=['Xvfb', '-help']
OSError=[Errno 2] No such file or directory  
Program install error! 
You can install it in terminal:
sudo apt-get install xvfb

他们说“xvfb”丢失了,所以我用“sudo apt-get install xvfb”安装它,然后编译。它对你有用吗?

但是编译后测试出错误:

*-----------------------*
Testing code

======== GOOGLE CHROME RESULTS ========
RUNNING OFFSCREEN TESTING..
Traceback (most recent call last):
File "./build.py", line 177, in <module>
scripts.test.calculate( paths.xtkDir + '/testing/xtk_tests_build.html', paths.xtkLibDir )
File "/home/fabien/X_3DNeo/utils/scripts/test.py", line 62, in calculate
chrome_results = runTests( xtkTestFile, xtkLibDir, browserString )
File "/home/fabien/X_3DNeo/utils/scripts/test.py", line 151, in runTests
result = browser.execute_script( 'return window.G_testRunner.getReport(true);' )
File "/home/fabien/X_3DNeo/lib/selenium/selenium/webdriver/remote/webdriver.py", line 385, in execute_script
{'script': script, 'args':converted_args})['value']
File "/home/fabien/X_3DNeo/lib/selenium/selenium/webdriver/remote/webdriver.py", line 153, in execute
self.error_handler.check_response(response)
File "/home/fabien/X_3DNeo/lib/selenium/selenium/webdriver/remote/errorhandler.py", line 147, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u"Script execution failed. Script: return window.G_testRunner.getReport(true);;\n Cannot call method 'getReport' of undefined" 
于 2012-05-15T12:24:54.773 回答