Well I'm a PHP developer who know few linux commands to get my job done.

I need to launch a symfony 1.4 website on Amazon EC2. Everything is fine except IMagick. I magick is also installed through following command:

sudo yum install ImageMagick

Its php lib is not installed/configured, if that do not happen with above command. In PHP, I'm using IMagick, but script is failing on IMagick. I know problem is with PHP IMagic extention but dont know how to fix that. On dev box, its as simple as turning it on on WAMP.

Can someone please suggest where should I look to confirm if IMagick PHP extention installed and configured correctly?


ImageMagick and PHP's imagick extension are separate entities. imagick depends on ImageMagick being installed, but isn't installed with it.

Typically, you'd install imagick with sudo pecl install imagick (you may need ImageMagick-devel and php-devel as well, I think). There are, depending on your repositories, also yum/apt packages that do it for you.

  • Thanks ceejayoz, finally the issue is fixed. However I also needed to run sudo yum install make glibc-devel gcc and sudo yum install ImageMagick-devel before sudo pecl install imagick. Oct 13 '12 at 3:23

These worked for me:

yum install php-pecl-imagick

if running php 5.5

yum install php55-pecl-imagick

if running php 5.6

yum install php56-pecl-imagick

if running php 7.0

yum install php70-pecl-imagick

if running php 7.1

 yum install php71-pecl-imagick

if running php 7.2 (YOU SHOULD BE BY NOW!)

 yum install php72-pecl-imagick
  • Glad I could help, getting my points! Apr 20 '16 at 17:46
  • it works for php 7.1 too. yum install php71-pecl-imagick Have-Fun ;-)
    – Schangu
    Jan 29 '18 at 13:23
  • Ran sudo yum install php72-pecl-imagick on my EC2 instance, got this: "No package php72-pecl-imagick available." =(
    – tpartee
    Jun 29 '20 at 23:56
  • What Linux distro is that on? @tpartee Jun 30 '20 at 20:18
  • 1
    @zeros-and-ones According to dmseg I am on Linux version 4.14.173-137.229.amzn2.x86_64 (mockbuild@ip-10-0-1-143) (gcc version 7.3.1 20180712 (Red Hat 7.3.1-6) - I did find the solution though through some digging around in yum, the correct package name is php-pecl-imagick - apparently the yum in this instance was smart enough to grab the correct version because after that package was added everything "just worked".
    – tpartee
    Jul 1 '20 at 21:17

In order to install php74-php-pecl-imagick to your ec2 instance without broken dependence you can follow the steps below and it will solve it.

yum install epel-release –y
amazon-linux-extras install epel
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum --enablerepo=remi install php74-php-pecl-imagick

With this steps above your php74-php-pecl-imagick module will be installed like a charm after that.


I am Using Amazon ec2 AMI and it worked for me:

yum install php72-pecl-imagick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.