Skip to content

Instantly share code, notes, and snippets.

@barnabyalter
Last active January 4, 2016 18:51
Show Gist options
  • Save barnabyalter/b89103312221f6506e8c to your computer and use it in GitHub Desktop.
Save barnabyalter/b89103312221f6506e8c to your computer and use it in GitHub Desktop.
Installing phantomjs on El Capitan

PhantomJS will not install on Mac OS X El Capitan.

Trying to install the stable release will give a pleasant enough error:

~$ brew install phantomjs
phantomjs: This formula either does not compile or function as expected on OS X
versions newer than Yosemite due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.

Trying to install from the updated HEAD will look like it installs but won't and will vaguely direct you to open issues:

Phantomjs 2.0 fails to install on 10.11 https://github.com/Homebrew/homebrew/issues/42249
Phantomjs fails to build on 10.6 https://github.com/Homebrew/homebrew/issues/38916

We are awaiting a patch release of 2.0.1 so we can go back to the beauty of brew install phantomjs, but until then we will use Node package manager to install it:

~$ brew install npm
~$ npm install phantom phantomjs -g

Not an ugly solution all told.

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