Question

I'm trying to get wkhtmltopdf working and i received the following error when using certain fonts with @font_face.

/usr/bin/wkhtmltopdf: symbol lookup error: /usr/bin/wkhtmltopdf: undefined symbol: FcFreeTypeQueryFace

So I looked it up and saw I needed up update fontconfig so I followed this guide.

wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.0.tar.gz
tar -zxvf fontconfig-2.11.0.tar.gz
cd fontconfig-2.11.0
./configure -prefix=/usr
make
# I moved the file file into /usr/lib manually (don't trust 'make install' on a production box)
sudo mv ./src/.libs/libfontconfig.so.1.2.0 /usr/lib/
# and setup the libfontconfig.so.1 symlink
cd /usr/lib
sudo ln -s libfontconfig.so.1.2.0 libfontconfig.so.1

I got to the line

./configure -prefix=/usr

and received this error.

configure: error:
*** expat is required. or try to use --enable-libxml2

Now I have no idea what to do. I know less than the basics in linux. Can someone please help me through this?

Thanks in advance.

Updates:

Tried

./configure -prefix=/usr --enable-libxml2

got error

checking for LIBXML2... no
configure: error: Package requirements (libxml-2.0 >= 2.6) were not met:

No package 'libxml-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML2_CFLAGS
and LIBXML2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

the i tried

yum install expat

got this

Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirror.trouble-free.net
 * extras: mirrors.advancedhosters.com
 * updates: mirror.atlanticmetro.net
base                                                                        | 1.1 kB     00:00
extras                                                                      | 2.1 kB     00:00
updates                                                                     | 1.9 kB     00:00
updates/primary_db                                                          | 147 kB     00:00
Setting up Install Process
Package expat-1.95.8-11.el5_8.x86_64 already installed and latest version
Nothing to do

after using

yum install libxml2-devel

I ran the config again and it worked.

./configure -prefix=/usr --enable-libxml2
Was it helpful?

Solution

To resolve this error:

configure: error:
*** expat is required. or try to use --enable-libxml2

You should try either:

yum install expat

or

./configure -prefix=/usr --enable-libxml2

To resolve this error:

configure: error: Package requirements (libxml-2.0 >= 2.6) were not met:

No package 'libxml-2.0' found

You should try:

yum-install libxml2-devel

and then re-run the configure:

./configure -prefix=/usr --enable-libxml2
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top