Required by Phantomjs but not on some headless systems
apt-get -y install fontconfig
Download the pre-compiled binary for 64bit Ubuntu
cd /tmp
wget https://phantomjs.googlecode.com/files/phantomjs-1.8.1-linux-x86_64.tar.bz2
Extract it
tar jxvf phantomjs-1.8.1-linux-x86_64.tar.bz2
Copy it in place
cp phantomjs-1.8.1-linux-x86_64/bin/phantomjs /usr/local/bin/
https://phantomjs.googlecode.com/files/phantomjs-1.8.1-linux-x86_64.tar.bz2
does not exists!