Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

centos

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.

like image 644
shiv Avatar asked Jul 16 '17 14:07

shiv


2 Answers

Just make sure you successfully run

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

and then try to install as usual.

like image 101
dmitryro Avatar answered Nov 04 '22 17:11

dmitryro


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.

like image 6
Manish Patolia Avatar answered Nov 04 '22 18:11

Manish Patolia