Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arthurattwell/4841d5a9669ca8665a882971b1c6608d to your computer and use it in GitHub Desktop.
Save arthurattwell/4841d5a9669ca8665a882971b1c6608d to your computer and use it in GitHub Desktop.
Install PhantomJS 2.1.1 on Ubuntu 14.04
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin
phantomjs --version
@arthurattwell
Copy link
Author

arthurattwell commented Jan 30, 2017

These steps work for Ubuntu 16.04. To make telbiyski's steps work on Ubuntu 14.04, I had to change line 10 from /usr/local/bin to /usr/bin. This may not be a good idea, because package managers might automatically change files there in future.

Remember to use the right release for your system. E.g. for an old Ubuntu machine, line 6 would be export PHANTOM_JS="phantomjs-2.1.1-linux-i686". The releases available with these commands are here.

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