I found this while testing an AngularJS client on travis-ci.

Install these to get PhantomJS to work on Ubuntu 14.04:

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
sudo apt-get install libfreetype6 libfreetype6-dev
sudo apt-get install libfontconfig1 libfontconfig1-dev

Source