Install ImageMagick (Image Manipulation) Tool on RHEL/CentOS and Fedora

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

27 Responses

  1. khoa says:

    Best place to execute ImageMagick online for you. Supporting all ImageMagick feature with output file and console log, no need to install.

  2. Ivan Rico says:

    Good! this solved my problem, thanks a lot

  3. Durai C says:


    I am getting error like
    /var/tmp/imagick/imagick.c:3299: error: ‘ZEND_MOD_END’ undeclared here (not in a function)
    make: *** [imagick.lo] Error 1
    ERROR: `make’ failed

    Kindly help me to solve this issue

    • Ravi Saive says:


      It seems that you’re installing ImageMagick on older version of PHP, consider upgrading to a more recent version that supports missing headers of ImageMagick, do:

      # yum update php
  4. Mark Jx says:


    I was trying to get jpeg / jpg file uploads working with mediawiki 1.23.6 on CentOS 7 with Apache/2.4.6 and php 5.4.16. I ran the command:

    yum install php-pear ImageMagick ImageMagick-devel ImageMagick-perl

    restarted httpd, and now everything works. Thanks!

  5. ehudson3 says:

    Hello. All went well until # pecl install imagick then I received this series of errors on CentOS 6.5 PHP 5.5.12:

    Warning: Invalid argument supplied for foreach() in Command.php on line 259

    Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

    Warning: Invalid argument supplied for foreach() in Command.php on line 259

    Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

    Notice: Undefined index: honorsbaseinstall in Role.php on line 180

    Notice: Undefined index: installable in Role.php on line 145

    Notice: Undefined index: phpfile in Role.php on line 212

    Notice: Undefined index: config_vars in Role.php on line 49

    Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259
    XML Extension not found

    What happened?

    Then I erased pear and /usr/share/pear/ folder. Installed go-pear with same results. I’d appreciate any insight and / or solution. I thank you Ravi and appreciate your articles!

    • Ravi Saive says:

      This error new to me, never seen such error, but I think PHP XML extension is missing, try to install php-xml via yum and then follow installation again.

  6. sougat says:

    Thanks a lot. I am able to setup Imagic in my server. Great and helpful article.

  7. Tonda says:

    I get error after command
    “sudo pecl install imagick”

    downloading imagick-3.1.2.tgz …
    Starting to download imagick-3.1.2.tgz (94,657 bytes)
    …………………done: 94,657 bytes
    15 source files, building
    running: phpize
    Can’t find PHP headers in /usr/include/php
    The php-devel package is required for use of this command.
    ERROR: `phpize’ failed

    then just install php-devel and everythink works like a charm.
    Thanks for this article :).

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.