How can I setup & run PhantomJS on Ubuntu? How can I setup & run PhantomJS on Ubuntu? linux linux

How can I setup & run PhantomJS on Ubuntu?


Guidouil's answer put me on the right track. I had to add one additional symlink to /usr/bin/, and I did direct symlinks for all 3 - see below.

I'm installing on Ubuntu server Natty Narwhal.

This is exactly what I did.

cd /usr/local/sharesudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2sudo tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjssudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjssudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs

And finally when I do

phantomjs -v

I get 1.9.7

If anyone sees any problems with what I've done, please let me know.


PhantomJS is on npm. You can run this command to install it globally:

npm install -g phantomjs-prebuilt  

phantomjs -v should return 2.1.1


download from phantomjs website the prebuilt package :http://phantomjs.org/download.htmlthen open a terminal and go to the Downloads folder

sudo mv phantomjs-1.8.1-linux-x86_64.tar.bz2 /usr/local/share/.cd /usr/local/share/sudo tar xjf phantomjs-1.8.1-linux-x86_64.tar.bz2sudo ln -s /usr/local/share/phantomjs-1.8.1-linux-x86_64 /usr/local/share/phantomjssudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs

then to check install phantomjs -v should return 1.8.1