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
I have a same problem, i found that problem is the host operative system kernel version (for example, into machines with CentosOS). If this is your case, the better options is update host OS or manually update the kernel versión.
Spanish (Native): He tenido el mismo error en contenedores y está asociado al Kernel de Linux del anfitrión de Docker (Por ejemplo, en máquinas con instalaciones de CentosOS). Si es tu caso, lo mejor es migrar a otro SO para el anfitrión o pensar en una actualización del kernel (tarea bastante más compleja y sin garantías de fallo).