尝试安装最新版本时,wkhtmltopdf 出现依赖问题

尝试安装最新版本时,wkhtmltopdf 出现依赖问题

我正在尝试在 ubuntu 服务器 12.04 上安装最新版本的 wkhtmltopdf。apt-get install wkhtmltopdf 仅安装版本 0.9.9,而我需要最新版本 0.12.2.1。我遇到了麻烦,所以我发布了一个问题这里,但这并没有起作用,而且当我尝试一些我不理解的事情时,似乎导致了更多问题。

我找到了一个安装最新版本的方法,就是下载最新版本然后这样安装dpkg -i wkhtmltox-0.12.2.1_linux-precise-i386.deb

尽管当我现在尝试这样做时,我得到了这个

Selecting previously unselected package wkhtmltox:i386.
(Reading database ... 178460 files and directories currently installed.)
Unpacking wkhtmltox:i386 (from .../wkhtmltox-0.12.2.1_linux-precise-i386.deb) ...
dpkg: dependency problems prevent configuration of wkhtmltox:i386:
wkhtmltox:i386 depends on xfonts-base.
wkhtmltox:i386 depends on xfonts-75dpi.
wkhtmltox:i386 depends on libstdc++6.
dpkg: error processing wkhtmltox:i386 (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
wkhtmltox:i386

当我尝试sudo dpkg -a --configure这样做时,它给了我这个

dpkg: dependency problems prevent configuration of wkhtmltox:i386:
 wkhtmltox:i386 depends on xfonts-base.
 wkhtmltox:i386 depends on xfonts-75dpi.
 wkhtmltox:i386 depends on libstdc++6.
dpkg: error processing wkhtmltox:i386 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 wkhtmltox:i386

我该如何修复这些依赖问题?

答案1

在 Ubuntu 14.04 和 Ubuntu 20.04.4 LTS 上

(正确的架构 32 位)

$ dpkg -i wkhtmltox-0.12.2.1_linux-trusty-i386.deb 
dpkg: dependency problems prevent configuration of wkhtmltox:
wkhtmltox depends on xfonts-base; however:
  Package xfonts-base is not installed.
wkhtmltox depends on xfonts-75dpi; however:
 Package xfonts-75dpi is not installed.

Ubuntu 20.04.4 LTS:

 sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb 
 Selecting previously unselected package wkhtmltox.
 (Reading database ... 230695 files and directories currently 
installed.)
 Preparing to unpack wkhtmltox_0.12.6-1.focal_amd64.deb ...
 Unpacking wkhtmltox (1:0.12.6-1.focal) ...
 dpkg: dependency problems prevent configuration of wkhtmltox:
 wkhtmltox depends on xfonts-75dpi; however:
 Package xfonts-75dpi is not installed.

dpkg: error processing package wkhtmltox (--install):
dependency problems - leaving configured
Processing triggers for man-db (2.9.1-1) ...

现在只需发出以下命令:

apt-get -f install

答案2

顺便说一句,我也遇到了同样的问题,结果发现是我尝试安装的 wkhtmltopdf 版本的问题。我有一个 Ubuntu 12.04.5 64 位系统,并尝试安装 32 位版本的软件包。看起来你那里也有 32 位版本;应该是 amd64 而不是 i386 吗?所有软件包下载都在这里:http://wkhtmltopdf.org/downloads.html

希望这可以帮助。

相关内容