Redhat / CentOS: ImageMagick Installation command

How do I install ImageMagick under CentOS / Fedora / RHEL / Redhat Linux for displaying and manipulating images via perl, php, blog and other web based apps?

ImageMagick is a simple program for any type of image manipulation on most systems. It can be used for thumbnail generation or captcha generation and so on.

Installation of ImageMagick

Type the following command as a root user to install imagemagick with perl and php support.

  • ImageMagick – It is an image display and manipulation tool for the X Window System. ImageMagick can read and write JPEG, TIFF, PNM, GIF, and Photo CD image formats. It can resize, rotate, sharpen, color reduce, or add special effects to an image, and when finished you can either save the completed work in the original format or a different one. ImageMagick also includes command line programs for creating animated or transparent .gifs, creating composite images, creating thumbnail images, and more.
  • ImageMagick-perl – Install ImageMagick-perl package if you want to use any perl scripts that use ImageMagick.

Type the following yum command/dnf command as the root user:
# yum install ImageMagick ImageMagick-perl
# dnf install ImageMagick ImageMagick-perl
Here is how it looks:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons:
 * base:
 * extras:
 * updates:
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ImageMagick.i386 0: set to be updated
--> Processing Dependency: for package: ImageMagick
--> Processing Dependency: for package: ImageMagick
 Package                                    Arch                         Version                                         Repository                     Size
 ImageMagick                                i386                                              base                          3.3 M
 ImageMagick                                x86_64                                            base                          3.3 M
 ImageMagick-perl                           x86_64                                            base                          147 k
Installing for dependencies:
 GConf2                                     i386                         2.14.0-9.el5                                    base                          1.5 M
 GConf2                                     x86_64                       2.14.0-9.el5                                    base                          1.5 M
 ORBit2                                     i386                         2.14.3-5.el5                                    base                          252 k
 ORBit2                                     x86_64                       2.14.3-5.el5                                    base                          263 k
 alsa-lib                                   x86_64                       1.0.17-1.el5                                    base                          414 k
Transaction Summary
Install     77 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total size: 56 M
Total download size: 46 M
Is this ok [y/N]:

The above will install ImageMagick and its dependencies automatically.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 6 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
6 comments… add one
  • Kurt Sep 5, 2011 @ 12:17


  • Yel Nov 10, 2011 @ 7:18

    Thank you!! :)

  • Christian Geiger Jan 7, 2013 @ 2:32

    many thanks for your help. I tried it for a long time and was kind of crazy:)
    greetings from Germany


  • Kumar Feb 15, 2013 @ 10:55


  • Pink Jul 11, 2013 @ 3:39

    I was trying “brew install imagemagick”, but that was working..Thanks a lot .!!

  • WHYoWHY Apr 23, 2014 @ 0:36

    I do not understand why Centos/RHEL based packages are STILL stuck on 6.2.8, they need to move forward just a little bit, there was a major bug in the 6.2* range. Breaks the ability to read PDF pages via Imagick/PHP, requires tons of work arounds BOOO. My next stop is to complain at the source.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum