2011-07-03 86 views
0

有没有人在Fedora 14上安装wkhtmltopdf?关于Fedora 14的wkhtmltopdf

http://code.google.com/p/wkhtmltopdf/wiki/compilation Debian有一个步骤。在评论中,也有类似于CentOS的东西。

到现在我已经安装:

  • 开发工具

  • 的OpenSSL devel的libXrender-devel的libXext-devel的libXft-devel的

  • QT(qt.x86_64 QT-devel的。 x86_64 qt-webkit.x86_64)

  • git

而且我也从混帐下载wkhtmltopdf:

git clone git://github.com/antialize/wkhtmltopdf.git wkhtmltopdf 

然而,最后的步骤是快把我逼疯了。在此处,所以我需要一些帮助:

  • 编译和安装wkhtmltopdf现在,所有你需要做的是编译和安装wkhtmltopdf

    使& &使安装

这里的wkhtmltopdf文件夹:

enter image description here

新的更新:

运行cd wkhtmltopdf && qmake-qt4 && make正常用户后,这里就是我的了:

enter image description here

然后,我又对一些Qt程序包,我应该有搜索,并用这组结束:

qt-webkit-devel.x86_64 php-qt-devel.x86_64 qt-x11.x86_64 qtnx.x86_64

然后,再次,我跑qmake-qt4 && make这一次它没有错误通过。

最后,我跑了sudo make install,它也没有错误地通过。

然而,当我跑wkhtmltopdf -h它返回:

wkhtmltopdf: error while loading shared libraries: libwkhtmltox.so.0: cannot open shared object file: No such file or directory

所以,我决定去一路编译QT,严格遵守了说明。最后,我得到了同样的错误:

$ wkhtmltopdf -h 
wkhtmltopdf: error while loading shared libraries: libwkhtmltox.so.0: cannot open shared object file: No such file or directory 

任何帮助将是伟大的。

谢谢!

回答

1

你错过了你必须运行的部分qmake

+0

我想你的意思是:你现在必须在wkhtmltopdf文件夹中运行qmake。 'cd wkhtmltopdf'和'qmake-qt4'? – Roger

+0

然后你错过了Qt的一部分。安装'qt-devel'。不要使用'sudo'来构建。 –

+0

好的。我现在正在使用root用户。这是我运行'make && make install'后得到的结果:/usr/include/gnu/stubs.h:9:27:致命错误:gnu/stubs-64.h:没有这样的文件或目录。编译终止。 – Roger

4

wkhtmltopdf想要libwkhtmltox.so.0 lib。但搜索到/lib64目录。 您可以:

cd /lib64 
ln -s /lib/libwkhtmltox.so.0 libwkhtmltox.so.0 

wkhtmltopdf -h 

之后就可以了。

(对不起,我的英语...)

+0

嘿,谢谢你 - 正是我需要的:) –

0
cd /lib64 
ln -s /lib/libwkhtmltox.so.0 libwkhtmltox.so.0 

这也工作在CentOS 6.2版(最终)

0

错误:

wkhtmltopdf: error while loading shared libraries: libwkhtmltox.so.0: cannot open shared object file: No such file or directory 

,也可以由引起想念Xorg,那么你可以在Debian上安装它:

apt-get install xorg