+-
Linux centos fontconfig帮助需要

我试图让wkhtmltopdf工作,并在使用@font_face的某些字体时收到以下错误。

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

所以我查了一下,看到我需要更新fontconfig,所以我按照本指南。

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

我到了这条线

./configure -prefix=/usr

并收到此错误。

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

现在我不知道该怎么做。我知道的不如linux中的基础知识。有人可以帮我解决这个问题吗?

提前致谢。

更新:

试着

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

得到了错误

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.

我试过了

yum install expat

明白啦

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

使用后

yum install libxml2-devel

我再次运行配置,它工作。

./configure -prefix=/usr --enable-libxml2
2
投票

要解决此错误:

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

你应该尝试:

yum install expat

要么

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

要解决此错误:

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

No package 'libxml-2.0' found

你应该试试:

yum-install libxml2-devel

然后重新运行configure:

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