Last active
December 9, 2023 17:40
-
-
Save sshymko/c8cff0f8bc51ecdbc4b69554f562526a to your computer and use it in GitHub Desktop.
Install latest ImageMagick 7.x and imagick PHP extension from PECL on Amazon Linux 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Uninstall ImageMagic library and imagick PHP extension using it (installed previously) | |
yum remove -y php-pecl-imagick ImageMagick | |
# Install libraries for JPG, PNG, GIF, WebP, and TIFF image formats | |
yum install -y libpng-devel libjpeg-devel openjpeg2-devel libtiff-devel libwebp-devel giflib-devel | |
# Install latest ImageMagick library compiled from downloaded sources | |
yum install -y gcc | |
curl -OL https://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar xzf ImageMagick.tar.gz | |
cd ImageMagick* | |
./configure --prefix=/ \ | |
--with-bzlib=yes \ | |
--with-fontconfig=yes --with-freetype=yes \ | |
--with-gslib=yes --with-gvc=yes \ | |
--with-jpeg=yes --with-openjp2=yes \ | |
--with-png=yes \ | |
--with-tiff=yes | |
make && make install | |
# Install imagick PHP extension from PECL | |
yum install -y php-pear php-devel | |
yes | pecl install imagick | |
echo 'extension=imagick.so' > /etc/php.d/40-imagick.ini | |
# Output installed versions | |
convert --version | |
php --ri imagick |
make is failing with:
CXXLD utilities/magick
libtool: error: unsupported hardcode properties See the libtool documentation for more information. Fatal configuration error.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for sharing your experience.
It was helpful for me.
./configure needs ' --disable-dependency-tracking' option (ImageMagick-7.1.0-22)
./configure --disable-dependency-tracking
(for amazonlinux:2 env)
related issue link
Thank you!!