【问题标题】:Linux centos fontconfig help needLinux centos fontconfig 帮助需要
【发布时间】:2013-12-09 23:03:29
【问题描述】:

我正在尝试让 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

【问题讨论】:

  • 你试过yum install expat还是./configure -prefix=/usr --enable-libxml2
  • 我根据您的建议更新了我的问题
  • 尝试yum install libxml2-devel安装libxml;然后重新运行configure。如果这不起作用,我就没主意了。
  • 成功了。如果您想将其添加为答案,我会接受。非常感谢!

标签: linux centos wkhtmltopdf fontconfig


【解决方案1】:

要解决此错误:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-04-21
    • 1970-01-01
    • 1970-01-01
    • 2011-07-17
    • 1970-01-01
    • 2022-01-04
    • 2017-10-05
    相关资源
    最近更新 更多