4

I am unable to install wkhtmltopdf on Ubuntu 14.4. I downloaded from wkhtmltopdf Linux (Ubuntu Trusty) 64 bit. I ran the following command:

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

Here's the log

(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

I searched but could not find anything specific. What am I missing here?

bitkot
  • 213

1 Answers1

11

first of all, if you don't care about version, you can install the package founded in the official Ubuntu repos:

sudo apt-get install wkhtmltopdf

But if you want to install your specific version above(0.12.2) you should resolve the package dependencies.

first try to run the command:

sudo apt-get install -f

If this solves it then ok else you have to install each dependency yourself.

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.

From above you can install each dependency yourself

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

But an easier solution is to use gdebi.

sudo apt-get install gdebi

then you can use it to resolve dependencies:

sudo gdebi wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
Maythux
  • 84,289