Version: 1.9.7
First, Get it from the PhantomJS website.
Update first and install the base: (root here)
apt-get update
apt-get install build-essential chrpath git-core libssl-dev libfontconfig1-dev libxft-dev
Lets Install:
git clone git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 1.9
./build.sh
Now, It (should) have PhantomJS properly on your system.
phantomjs --version
These packages needed by PhantomJS to work correctly:
sudo apt-get install libfreetype6 libfreetype6-dev
sudo apt-get install libfontconfig1