Skip to content

Instantly share code, notes, and snippets.

@sshymko
Last active December 9, 2023 17:40
Show Gist options
  • Select an option

  • Save sshymko/c8cff0f8bc51ecdbc4b69554f562526a to your computer and use it in GitHub Desktop.

Select an option

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
#!/bin/sh
# Uninstall global ImageMagic and imagick PHP extension using it
yum remove php-pecl-imagick ImageMagick -y
# Install latest ImageMagick by compiling sources
yum install gcc -y
wget https://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick*
./configure --prefix=/
make
make install
# Install imagick PHP extension from PECL
yum install php-pear php-devel -y
yes | pecl install imagick
echo 'extension=imagick.so' > /etc/php.d/40-imagick.ini
@nobel6018
Copy link

nobel6018 commented Feb 1, 2022

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!!

@jetpen
Copy link

jetpen commented Dec 23, 2022

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