Skip to content
Advertisement

Docker – install wkhtmltopdf – error updating from 0.12.4 to 0.12.6

I have a dockerfile which successfully installs wkhtmltopdf v0.12.4 but I need to update this to a newer version (0.12.6) as it doesn’t seem to be compatible with some other upgrades I’ve made.

Here’s the code that works (albeit incompatible)

JavaScript

And here’s the code that’s not working…

JavaScript

And here’s the error message I’m getting…

JavaScript

Advertisement

Answer

Based on the comments, the url that you use to download the package 0.12.6 doesn’t include the precompiled binary, only the source code. One way to get it would be to try to compile it yourself during the docker image build. Another, easier way would be to use one of the deb packages from 0.12.6 r1 (as suggested here), for example this deb package should be what you need to install wkhtmltopdf/wkhtmltoimage into php:7.3.31-apache: wkhtmltox_0.12.6-1.buster_amd64.deb.

It requires couple of packages to be installed, here is a full list of commands that would download and install it:

JavaScript

Here is to verify the versions:

JavaScript

Here are the locations of the binaries installed from deb, in case you need to adjust your process:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement