如何在Docker php-fpm Alpine Linux上安装wkhtmltopdf?

时间:2019-06-03 11:04:37

标签: docker wkhtmltopdf alpine

我使用以下命令在Alpine Docker上安装了Wkhtmltopdf:

apk add --no-cache wkhtmltopdf

但是,当我尝试运行wkhtmltopdf时,我得到了:

/usr/bin/wkhtmltopdf  "test.html" "test.pdf"
Cannot mix incompatible Qt library (version 0x50c03) with this library (version 0x50c00)
Aborted (core dumped)

我该如何解决?

编辑:

似乎问题在于其他一些软件包安装的qt版本不兼容。这是我的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

0 个答案:

没有答案