Installing PhantomJS in CentOS

Viewed 5417

I am trying to install PhantomJS in Centos. These are the steps I followed.

yum install freetype fontconfig
cd ~
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2
bunzip2 phantomjs*.tar.bz2
tar xvf phantomjs*.tar
cp phantomjs*/bin/phantomjs /usr/bin/phantomjs

I'm getting this below error.

phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

Can anyone throw some light. I have installed fontconfig.

4 Answers

The below worked for me on Amazon Linux 2018.03. (While not exactly the same, Amazon Linux is similar to RedHat / Centos)

yum install fontconfig freetype freetype-devel fontconfig-devel libstdc++
Related