Featured image of post Fix Docker install-php-extensions Imagick "imagick-3.7.0 install failed" Issue

Fix Docker install-php-extensions Imagick "imagick-3.7.0 install failed" Issue

Fix Docker install-php-extensions Imagick "imagick-3.7.0 install failed" Issue

Photo by Ben Griffiths on Unsplash

Docker Install Imagick Error

RUN install-php-extensions imagick

Error Message

22.24 Saved /tmp/pear/temp/imagick/ImagickPixel_arginfo.h
22.25 In /tmp/pear/temp/imagick/Imagick.stub.php:
22.25 Unterminated preprocessor conditions
22.26 make: *** [Makefile:196: /tmp/pear/temp/imagick/Imagick_arginfo.h] Error 1
22.26 ERROR: `make -j10 INSTALL_ROOT="/tmp/pear/temp/pear-build-defaultuserAdMKLn/install-imagick-3.7.0" install' failed

Solution

When installing Imagick, specify the correct version master 28f27044e435a2b203e32675e942eb8de620ee58

# https://github.com/Imagick/imagick/commits/master/
# RUN install-php-extensions imagick/imagick@master
RUN install-php-extensions imagick/imagick@28f27044e435a2b203e32675e942eb8de620ee58

The current master version works normally, but to avoid the risk of master changing at any time and potentially breaking the production environment, specify the current master version commit hash 28f27044e435a2b203e32675e942eb8de620ee58.

Imagick Version Number: https://github.com/Imagick/imagick/commits/master/

Reference

All rights reserved,未經允許不得隨意轉載
Built with Hugo
Theme Stack designed by Jimmy