Install PhatomJS

Execute as root to install required packages:

aptitude update
aptitude install build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev

Download PhantomJS version 1.9.8 and extract the directory:

tar -jxpvf phantomjs-1.9.8-linux-x86_64.tar.bz2

Move the directory to /usr/local/share:

mv phantomjs-1.9.8-linux-x86_64 /usr/local/share

Finally, create a link to phantomjs in /usr/bin:

ln -sf /usr/local/share/phantomjs-1.9.8-linux-x86_64 /usr/local/bin