Skip to content

Instantly share code, notes, and snippets.

@jasonhinkle
Last active August 29, 2015 14:27
Show Gist options
  • Save jasonhinkle/88276b7f02cb678bb64e to your computer and use it in GitHub Desktop.
Save jasonhinkle/88276b7f02cb678bb64e to your computer and use it in GitHub Desktop.
Patching PhantomJS 2.0

The PhantomJS 2.0 official binary has problems when using with Selenium. Pre-built hotpatched versions of phantomjs for OSX and Ubuntu are available at:

If you prefer to use the official binary or build from source yourself, the following errors may have to be fixed:

If phantomjs dies on OSX with message "Killed 9" then the following code will fix it.

brew install upx
upx -d /usr/local/bin/phantomjs

If phantom dies with "main.fail" then you may need to either edit the source before building, or you can patch the binary with a hex editor. See: https://gist.github.com/neuro-sys/41e368839a9b20dafb34 for instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment