Installing Casperjs on Ubuntu / Debian

 

Step 1: Installing PhantomJS

– Download the latest source

 

 

– Extract the archive

 

tar -xvf phantomjs-1.8.2-linux-x86_64.tar.bz2

 

– Move the extracted folder to a proper location:

 

sudo mv phantomjs-1.8.2-linux-x86_64 /usr/local/src/phantomjs

 

– Create a symbolic link so we can just type “phantomjs” when we want to use “the phantom”

 

sudo ln -sf /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/phantomjs

 

– Check if it’s working

 

phantomjs --version

 

If you see the current PhantomJS version you can proceed with installing CasperJS.

Step 2: Installing CasperJS

– Enter a proper location to avoid moving the extracted files:

 

cd /usr/local/src/

 

– Get the source from the official git repository:

 

sudo git clone git://github.com/n1k0/casperjs.git

 

– Create symbolic link

 

sudo ln -sf /usr/local/src/casperjs/bin/casperjs /usr/local/bin/casperjs

 

– Check if it’s working

 

casperjs --version

 

Voilla, you have successfully installed CasperJS!

 

http://codebushes.wordpress.com/2013/03/14/casperjs/