Linux wkhtmltopdf - libfontconfig.so.1:无法打开共享对象文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13046555/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 17:35:45  来源:igfitidea点击:

wkhtmltopdf - libfontconfig.so.1: cannot open shared object file

phplinuxsymfony

提问by Alon

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.

我正在尝试在我的 debian linux 服务器上安装 wkhtmltopdf,因此我将能够测试它是否从 url 创建了 pdf。

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

我已经下载了 wkhtmltopdf-0.9.9-static-i386.tar.bz2 并将其内容解压缩到一个目录中。

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

当我尝试测试它是否有效时,我遇到了下一个错误:

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

/usr/local/bin# wkhtmltopdf http://google.comgoogle.pdf wkhtmltopdf:加载共享库时出错:libfontconfig.so.1:无法打开共享对象文件:没有这样的文件或目录

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

我正在尝试在我的 symfony2 上安装https://github.com/KnpLabs/KnpSnappyBundle,我想我需要先在我的 linux 上安装 wkhtmltopdf。我对吗?

采纳答案by JvdBerg

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

我花了几个小时来解决这个问题,但您还需要安装 libfontconfig1 例如:

apt-get install libfontconfig1