PhantomJS: getting "Killed: 9" for anything I'm trying

  1. Install UPX. UPX is an executable packer and unpacker

    $ brew install upx
    
  2. Unpack the phantomjs executable

    $ upx -d phantomjs-2.0.0-macosx/bin/phantomjs
    
  3. Run the phantomjs executable

    $ ./phantomjs-2.0.0-macosx/bin/phantomjs
    

re: running phantomjs on osx yosemite, download the build/fix found at:

https://github.com/eugene1g/phantomjs/releases

original issue:

https://github.com/ariya/phantomjs/issues/12928


The eugene1g release and UPX install didn't work for me on El Capitan. What did work for me was installing PhantomJS using the phantomjs2 NPM package:

npm install phantomjs2

# Optional: symlink in a dir that's on my PATH:
ln -s /usr/local/lib/node_modules/phantomjs2/lib/phantom/bin/phantomjs /usr/local/bin/phantomjs