I installed Wkhtmltopdf on Alpine Docker with the following command:
apk add --no-cache wkhtmltopdf
However when I try to run wkhtmltopdf I get:
/usr/bin/wkhtmltopdf "test.html" "test.pdf"
Cannot mix incompatible Qt library (version 0x50c03) with this library (version 0x50c00)
Aborted (core dumped)
How can I fix that?
EDIT:
Seems like the issue is that some other package installs not compatable qt version. Here's my Dockerfile:
RUN apk --no-cache update \
&& apk --no-cache upgrade \
&& apk add --no-cache \
mysql-client \
php7-mysqli \
php7-pdo \
freetype \
libpng \
freetype-dev \
libpng-dev \
jpeg-dev \
libjpeg \
libjpeg-turbo-dev \
wget \
zlib-dev \
ttf-freefont \
fontconfig \
xvfb \
libxrender-dev \
gettext \
gettext-dev \
libxml2-dev \
gnu-libiconv-dev \
autoconf \
g++ \
git \
bash \
wkhtmltopdf
VERSION_ID=3.9.2
I use php:7.2-fpm-alpine as a base image. Not sure if it's possible to update to 3.9.4 – Fonzphp
base image I think, because it works on vanilla Alpine (alpine:3.9.2
). – Bacchanalia