error while loading shared libraries: libfontconfig.so.1 on cent os

Viewed 21583

I am newbie for Cent os. Installing phantomjs on Cent os. Followed below steps but still facing issue.

Steps :

  1. curl -O https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-i686.tar.bz2.
  2. tar xvf phantomjs-1.9.1-linux-i686.tar.bz2
  3. cp phantomjs-1.9.1-linux-i686/bin/phantomjs /usr/local/bin
  4. sudo yum install freetype
  5. sudo yum install fontconfig

Above all steps completed successfully but when I try to hit phantomjs, it shows error "phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory."

Thanks in advance.

3 Answers

To remove this error.

# sudo yum install fontconfig

If you are still facing the error, Run

# sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6

Note : If you are using ubuntu or debian, use apt-get install to install this package.

centos, NodeJS, html-pdf sudo yum install fontconfig (worked for me)

Related