How to Install ImageMagick 7 on Debian and Ubuntu

ImageMagick is a free and open source, feature-rich, text-based and cross-platform image manipulation tool used to create, edit, compose, or convert bitmap images. It runs on Linux, Windows, Mac Os X, iOS, Android OS, and many other operating systems.

It features command line processing, creation of animations, color management, special effects, text and comments, complex text layout, connected content labeling, image decoration, and drawing (add shapes or text to an image). It also supports format conversion, distributed pixel caching, large images, image transformation and so much more.

Read Also: How to Install ImageMagick on CentOS and Fedora

Although its functionality is typically utilized from the command-line, you can use its features from programs written in any of the supported programming languages. It is designed for batch processing of images (i.e ImageMagick allows you to combine image processing operations in a script (shell, DOS, Python, Ruby, Perl, PHP, and many others)).

In this article, we will explain how to install and compile ImageMagick from source code in Debian and Ubuntu distributions.

Installing Dependencies for ImageMagick

To install ImageMagick from source, you need a proper development environment with a compiler and related development tools. If you don’t have the required packages on your system, install build-essential as shown:

$ sudo apt update 
$ sudo apt-get install build-essential

Once you’ve installed compilation dependencies, now you can download the ImageMagick source code.

Download ImageMagick Source Files

Go to the official ImageMagick download page and grab the latest “ImageMagick.tar.gz” source code package. Alternatively, you can use the following wget command to download the source code directly in the terminal as shown.

$ wget

Once the download is complete, extract its content and move into the extracted directory.

$ tar xvzf ImageMagick.tar.gz
$ cd ImageMagick-7.0.8-26/

ImageMagick Compilation and Installation

Now it’s time to configure and compile ImageMagick by running the ./configure command to perform a compilation configuration.


Next, run the make command to perform the compilation.

$ make

Once the compilation is successful, install it and configure the dynamic linker run-time bindings as follows.

$ sudo make install 
$ sudo ldconfig /usr/local/lib

Finally, verify that ImageMagick 7 has been installed on your system by checking its version.

$ magick -version
$ identify -version
Check ImageMagick Version in Ubuntu

Check ImageMagick Version in Ubuntu

That’s all! ImageMagick is a feature-rich image manipulation tool used to create, edit, compose, or convert bitmap images.

In this article, we have showed how to install ImageMagick 7 from source in Debian and Ubuntu. Use the comment form below to ask any questions or give us feedback.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

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.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

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

4 Responses

  1. Kehinde says:

    Please how do i uninstall?

    • Ravi Saive says:


      Go to the cd ImageMagick-7.0.8-26/ directory and run the following command to remove ImageMagic7 from the system.

      # make clean
  2. Clive says:

    Hi! Is there a reason for not doing it this simple way?

    $ sudo apt-get install imagemagick imagemagick-doc

    I had done it the way you described but then it wasn’t available in my web CMS (I was probably too stupid to link it properly). So I searched again and found the above mentioned way which was way faster and just worked. Now the website can use it.

    The 2nd question would now be: what do I need to uninstall/delete if I want to get rid of the installation as listed above?

    • Michael says:

      That works when the installation binary is already in your system. I’m not that good with Linux or for that matter Ubuntu OS, but your “simple” method did not work for me. It will always return “imagemagick” not found error.

      This article saved my day. I’m yet to add to my php

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.