Home » Php » php – wkhtmltopdf – libfontconfig.so.1: cannot open shared object file

php – wkhtmltopdf – libfontconfig.so.1: cannot open shared object file

Posted by: admin April 23, 2020 Leave a comment

Questions:

I’m trying to install wkhtmltopdf on my debian linux server so I will be able to test if it creates a pdf from a url.

I’ve downloaded wkhtmltopdf-0.9.9-static-i386.tar.bz2 and extracted it’s contents to a directory.

When I try to test if it’s working, I came across the next error:

/usr/local/bin# wkhtmltopdf http://google.com google.pdf
wkhtmltopdf: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

I’m trying to install https://github.com/KnpLabs/KnpSnappyBundle on my symfony2 and I think I need to install wkhtmltopdf on my linux first. Am I right?

How to&Answers:

It took me a few hours to solve this one, but you need to install libfontconfig1 also e.g.:

apt-get install libfontconfig1