In case if you want to install phantomjs and you have just console OS without GUI you have to install additional libraries:
sudo apt-get install freetype-devel fontconfig-devel
In case if you want to install phantomjs and you have just console OS without GUI you have to install additional libraries:
sudo apt-get install freetype-devel fontconfig-devel