Ubuntu – Dependency problems with wkhtmltopdf when trying to install latest version

aptdependenciesdpkg

I'm trying to install the latest version of wkhtmltopdf on an ubuntu server 12.04. apt-get install wkhtmltopdf only installs version 0.9.9 and I need the latest version, 0.12.2.1. I was having trouble so I posted a question here, but that didn't work, and seemed to cause more problems as I was trying things I don't understand.

I found a way to install the latest version. That is, download the latest version and install it like this dpkg -i wkhtmltox-0.12.2.1_linux-precise-i386.deb

Although when I try do that now, I get this

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

And when I try and do sudo dpkg -a --configure it gives me this

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

How can I fix these dependency problems?

Best Answer

FWIW, I ran into this same problem and it turned out to be an issue with the version of wkhtmltopdf I was trying to install. I have an Ubuntu 12.04.5 64-bit system and was trying to install a 32-bit version of the package. Looks like you have the 32-bit version there as well; should it be amd64 instead of i386? All package downloads here: http://wkhtmltopdf.org/downloads.html.

Hope this helps.