无法安装 wk .deb

无法安装 wk .deb

我无法在 Ubuntu 14.4 上安装 wkhtmltopdf。我从转PDFLinux(Ubuntu Trusty)64 位。我运行了以下命令:

sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

以下是日志

(Reading database ... 61662 files and directories currently installed.)
Preparing to unpack wkhtmltox-0.12.2.1_linux-trusty-amd64.deb ...
Unpacking wkhtmltox (0.12.2.1) over (0.12.2.1) ...
dpkg: dependency problems prevent configuration of wkhtmltox:
 wkhtmltox depends on fontconfig; however:
  Package fontconfig is not installed.
 wkhtmltox depends on libjpeg-turbo8; however:
  Package libjpeg-turbo8 is not installed.
 wkhtmltox depends on xfonts-base; however:
  Package xfonts-base is not installed.
 wkhtmltox depends on xfonts-75dpi; however:
  Package xfonts-75dpi is not installed.

dpkg: error processing package wkhtmltox (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.6.7.1-1) ...
Errors were encountered while processing:
 wkhtmltox

我搜索了但没找到任何具体内容。我遗漏了什么?

答案1

首先,如果您不关心版本,您可以安装官方 Ubuntu 存储库中找到的软件包:

sudo apt-get install wkhtmltopdf

但是如果您想安装高于此特定版本(0.12.2),则您应该解决软件包依赖关系。

首先尝试运行命令:

sudo apt-get install -f

如果这样可以解决问题,那么就没问题了,否则你必须自己安装每个依赖项。

dpkg: dependency problems prevent configuration of wkhtmltox:
 wkhtmltox depends on fontconfig; however:
  Package fontconfig is not installed.
 wkhtmltox depends on libjpeg-turbo8; however:
  Package libjpeg-turbo8 is not installed.
 wkhtmltox depends on xfonts-base; however:
  Package xfonts-base is not installed.
 wkhtmltox depends on xfonts-75dpi; however:
  Package xfonts-75dpi is not installed.

从上面你可以自己安装每个依赖项

sudo apt-get install fontconfig
sudo apt-get install libjpeg-turbo8
sudo apt-get install xfonts-base
sudo apt-get install xfonts-75dpi

更简单的解决方案是使用格德比

sudo apt-get install gdebi

然后您可以使用它来解决依赖关系:

sudo gdebi wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

相关内容