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:
- http://phreeze.com/assets/phantomjs-2.0.0-macosx-hotpatch.zip
- http://phreeze.com/assets/phantomjs-2.0.0-ubuntu-hotpatch.zip
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.