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

33 Responses

  1. This worked perfectly. Excellent

  2. Siva says:

    I just found out that ghost script was already installed on the server
    # which gs

  3. Siva says:

    Awesome Article. You solved my problem. thanks a lot.

    • Siva says:

      I have a requirement where i need to convert a pdf to a jpeg thumbnail and i need to do this in php. I already installed imagick ( following ur article steps), do i need to install ghostscript too for converting the pdf to jpeg using a php script ? If I do can you breifly outline how to install ghostscript on centos

  4. Ilian Andreev says:

    Fantastic explanation, fantastic article !!! Thanks !

  5. Mahesh says:

    How to install the latest version of imagemagick?

  6. Andrew says:

    pecl install imagick fails with the following output (on CentOS 5.9 w/ PHP 5.4):

    /var/tmp/imagick/imagick_class.c: In function ‘zim_imagick_setimageprogressmonitor’:
    /var/tmp/imagick/imagick_class.c:9534: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’
    /var/tmp/imagick/imagick_class.c:9534: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function)
    /var/tmp/imagick/imagick_class.c:9534: error: (Each undeclared identifier is reported only once
    /var/tmp/imagick/imagick_class.c:9534: error: for each function it appears in.)
    /var/tmp/imagick/imagick_class.c:9534: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function)
    make: *** [imagick_class.lo] Error 1
    ERROR: `make’ failed

    Any help would be appreciated.

  7. Amit says:

    while looking into the apache error logs it is giving this error
    mod_fcgid: stderr: PHP Warning: Division by zero in /home/xxx/public_html/xxxx/logo.php on line 216,

  8. Amit says:

    Hi,

    I have done everything accordingly but I am not able to see the imagick extension in phpinfo();

    php -m | grep imagick — it shows that imagick is there but in phpinfo(); it is not shown anywhere….
    nor I am able to run the functions getsize() etc; through my php script.
    Please help
    Thanks

    • Ravi Saive says:

      Have you restarted Apache?

      • Amit says:

        I have restarted several time !!
        Thanks for your reply

        • Ravi Saive says:

          Ok, no need to worry about, if it’s showing via command line, means it installed correctly..

          • Amit says:

            But when trying to upload the image and resize my script is not working !! though my local script is working fine !!

            Any help would be great ….
            Thanks

          • Marty says:

            I ran into a problem that sounds similar to Amit’s. I added extension=imagick.so to my ini file, but no love. A few thoughts: make sure you have it in the right .ini file (eg: on debian flavoured linux it needs to be in /etc/php5/apache2/…

            also I found that pecl installed the module in /usr/lib/php/modules but my extension_dir was set to /usr/lib64/php/modules/ so i created a symlink and everything started working fine

  9. bakti says:

    Thanks so much!

  10. Hemant says:

    Thanks for completing my request of tutorial on imagick extension…..Thanks again.

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.