PhantomJS崩溃 – 退出代码126
当我尝试在CentOS(64位)系统的工作stream程中运行phantomJS时遇到一个奇怪的问题。
这是它报告的错误:
[4mRunning "qunit:all" (qunit) task[24m Testing http://localhost:8000/tests.html Running PhantomJS...[31mERROR[39m [31m>> [39m/home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: /home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: cannot execute binary file 0 [ '/home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: /home/jenkins/jenkins/workspace/nick_node_te/web-client/client/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs: cannot execute binary file' ] [33mWarning: PhantomJS exited unexpectedly with exit code 126. Use --force to continue.[39m [31mAborted due to warnings.[39m
我似乎无法find这种types的崩溃的任何良好的文档。 这是通常和/或值得一个错误报告?
更新:
这些是我的文件的权限:
-rwxr-x--x. 1 root root 11308856 Sep 26 12:39 phantomjs
听起来就像它不是为你试图运行的平台而构build的。 确保删除node_modules
目录,并在将存储库克隆到新平台时执行全新的npm install
。 将您的node_nodules
目录包含在您的源代码pipe理中是一个不好的做法。 只要保持你的package.json
文件保持良好,并为每个回购克隆做一个npm install
或npm update
。 另外,如果你正在使用git
,添加node_modules/
到你的.gitignore
文件,所以当你添加更改和提交时你不必担心意外地包含它。