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.