Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit Code 126 -- "Cannot execute binary" #46

PunkChameleon opened this issue Sep 27, 2013 · 3 comments


None yet
2 participants
Copy link

commented Sep 27, 2013

Hey all,

I'm getting a strange issue when trying to run phantomJS in my workflow on a CentOS system.

Here is the error it's reporting:

[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

Here are my permissions for phantomjs:
-rwxr-x--x. 1 root root 11308856 Sep 26 12:39 phantomjs

I was directed to bring it up in this project instead of the phantomJS one (ariya/phantomjs#11646).

Is it possible this is from installing the module (with npm install) on a Mac, committing it, and then deploying it to a CentOS server? Or is it something entirely different?

I also have put out a SO post on it (, but haven't gotten any bites.

Can anyone help? Is this a bug?


This comment has been minimized.

Copy link
Contributor Author

commented Sep 30, 2013

Okay, this had to do with two things -- one, I needed to run npm install on the server itself, because the PhantomJS binaries are OS specific. After that, I had to install fontconfig and truetype (I think that was the name) to let PhantomJS run.

Hope this helps someone else. Closing.


This comment has been minimized.

Copy link

commented Oct 1, 2013

There's a short OS Dependencies section in the readme:

Did you miss those? Or was there something else? Maybe those need to be more prominent?


This comment has been minimized.

Copy link
Contributor Author

commented Oct 1, 2013

I must have. Maybe we could move them up in the ReadMe into the getting started? Also, it may be helpful to add CentOS/RHEL into the dependency list as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.