Skip to content

Instantly share code, notes, and snippets.

@pboling
Last active July 23, 2019 17:54
Show Gist options
  • Save pboling/1a1c603451779f912536 to your computer and use it in GitHub Desktop.
Save pboling/1a1c603451779f912536 to your computer and use it in GitHub Desktop.
How to install old PhantomJS 1.8.2 on Mac OS X

PhantomJS

Install phantomjs (http://phantomjs.org)

brew has a recipe for phantomjs, but it has moved on to version 2.0.0, and we still require 1.8.2 (at newest), and we can't get that old and dirty with brew anymore.

On a Mac:

mkdir -p ~/root
wget https://phantomjs.googlecode.com/files/phantomjs-1.8.2-macosx.zip -O ~/root/phantomjs-1.8.2-macosx.zip
cd ~/root
unzip phantomjs-1.8.2-macosx.zip
echo 'export PATH=~/root/phantomjs-1.8.2-macosx/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Now when you run which phantomjs you should see the phantomjs executable

which phantomjs
/Users/pboling/root/phantomjs-1.8.2-macosx/bin/phantomjs
@footnoise
Copy link

@Onikoroshi
Copy link

Thanks for the tip! Unfortunately, that doesn't seem to be complete. Now, when I try phantomjs -v it gives me a Segmentation fault: 11 error. And when I try to run my specs, it says "The detector # failed to detect theversion of the executable at '/Users/petercormack/root/phantomjs-1.8.2-macosx/bin/phantomjs'"

@victorbrender
Copy link

@Onikoroshi Did you find a fix for your issue? I am having the same one.

@tarmotalu
Copy link

If you have suggested version already installed then you can switch between versions. https://docs.brew.sh/Tips-N'-Tricks

brew info phantomjs
brew switch phantomjs 1.8.2

@givp
Copy link

givp commented Sep 5, 2018

FYI the download link no longer exists. The oldest version available for download is now here: https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.6-macosx.zip

@jstewsy
Copy link

jstewsy commented Sep 5, 2018

Did anyone ever solve the Segmentation fault error?

@millisami
Copy link

I'm facing this error too. Any solution?

@pboling
Copy link
Author

pboling commented Jul 23, 2019

@millisami I think the best solution is to evaluate alternatives. PhantomJS is a dead project. NightmareJS is awesome. http://www.nightmarejs.org/

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