【问题标题】:wkhtmltopdf on Fedora 14Fedora 14 上的 wkhtmltopdf
【发布时间】:2015-11-16 22:03:42
【问题描述】:

有人在 Fedora 14 上安装过 wkhtmltopdf 吗?

http://code.google.com/p/wkhtmltopdf/wiki/compilation 上,Debian 是一步一步来的。在 cmets 中,也有类似 CentOS 的东西。

到现在我已经安装好了:

  • 开发工具

  • openssl-devel libXrender-devel libXext-devel libXft-devel

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

  • git

而且我还从 git 下载了 wkhtmltopdf:

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

但是,最后的步骤让我发疯了。这就是我需要帮助的地方:

  • 编译和安装wkhtmltopdf 现在你需要做的就是编译和安装wkhtmltopdf

    制作 && 制作安装

这是 wkhtmltopdf 文件夹:

新更新:

在以普通用户身份运行cd wkhtmltopdf && qmake-qt4 && make后,我得到了:

然后,我再次搜索了一些我应该拥有的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

任何帮助都会很棒。

谢谢!

【问题讨论】:

    标签: compilation fedora wkhtmltopdf


    【解决方案1】:

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

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

    之后就好了。

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

    【讨论】:

      【解决方案2】:

      您错过了必须运行qmake 的部分。

      【讨论】:

      • 我猜你的意思是:你现在必须在 wkhtmltopdf 文件夹中运行 qmake。 cd wkhtmltopdfqmake-qt4?
      • 那你错过了 Qt 的一部分。安装qt-devel。并且不要使用sudo 来构建。
      • 好的。我现在正在使用 root 用户。这是我在运行make && make install 后得到的:/usr/include/gnu/stubs.h:9:27: fatal error: gnu/stubs-64.h: No such file or directory。编译终止。
      • 关于qt-devel:包1:qt-devel-4.7.2-8.fc14.x86_64 已经安装且最新版本
      • 这是glibc-devel 的一部分;确保您已经为您的架构安装了适当的版本。并且不要以 root 身份构建。
      【解决方案3】:
      cd /lib64
      ln -s /lib/libwkhtmltox.so.0 libwkhtmltox.so.0
      

      这也适用于 CentOS 版本 6.2(最终版)

      【讨论】:

        【解决方案4】:

        错误:

        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
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2011-07-28
          • 2012-05-06
          • 1970-01-01
          • 2011-08-02
          • 1970-01-01
          • 2011-05-06
          • 2013-03-20
          • 1970-01-01
          相关资源
          最近更新 更多