Featured image of post แก้ไขปัญหา Docker install-php-extensions Imagick "imagick-3.7.0 install failed"

แก้ไขปัญหา Docker install-php-extensions Imagick "imagick-3.7.0 install failed"

แก้ไขปัญหา Docker install-php-extensions Imagick "imagick-3.7.0 install failed"

Photo by Ben Griffiths on Unsplash

ข้อผิดพลาดการติดตั้ง Docker Imagick

RUN install-php-extensions imagick

ข้อความแสดงข้อผิดพลาด

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

วิธีแก้ปัญหา

เมื่อติดตั้ง Imagick ให้ระบุเวอร์ชันที่ถูกต้อง master 28f27044e435a2b203e32675e942eb8de620ee58

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

เวอร์ชัน master ปัจจุบันทำงานได้ตามปกติ แต่เพื่อหลีกเลี่ยงความเสี่ยงที่ master จะเปลี่ยนแปลงได้ตลอดเวลาและอาจทำให้สภาพแวดล้อมการใช้งานจริงเสียหาย ให้ระบุแฮชของคอมมิต master ปัจจุบัน 28f27044e435a2b203e32675e942eb8de620ee58

หมายเลขเวอร์ชัน Imagick: https://github.com/Imagick/imagick/commits/master/

Reference

All rights reserved,未經允許不得隨意轉載
ถูกสร้างด้วย Hugo
ธีม Stack ออกแบบโดย Jimmy