How to Fix wkhtmltopdf: error while loading shared libraries: libfontconfig.so.1: Ubuntu 14

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

If you get this error while installing wkhtmltopdf you are probably missing one of the following required files/packages:

libXext libXrender fontconfig libfontconfig.so.1

For Ubuntu you can use http://packages.ubuntu.com/ to find in which packages these files reside and then install them:

sudo apt-get -y install libxrender1
sudo apt-get -y install libxext-dev
sudo apt-get -y install libxrender1
sudo apt-get -y install fontconfig
sudo apt-get -y install libfontconfig1

For Centos/Fedora/RHEL Server try this: aurobindapothal.wordpress.com

wkhtmltopdf: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
when you are installing wkhtmltopdf in server and getting error this type you need to install below packages.

# yum install libXext libXrender fontconfig libfontconfig.so.1
If you will find Squre bracket word error after the generate PDF file.
you Need to install below packages.

# yum install urw-fonts