2013-12-09 51 views
1

我試圖讓wkhtmltopdf工作,並且在使用@font_face使用某些字體時收到以下錯誤。Linux centos fontconfig幫助需要

/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 
+0

你嘗試'百勝安裝expat'或'的./configure -prefix =/USR - 使-libxml2'? –

+0

我更新了我的問題並提供了建議的結果 –

+0

嘗試'yum install libxml2-devel'安裝libxml;然後重新運行'configure'。如果這不起作用,我就沒有想法。 –

回答

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 -prefix=/usr --enable-libxml2