VOOZH about

URL: https://www.tecmint.com/install-imagemagick-on-debian-ubuntu/

⇱ How to Install ImageMagick on Debian and Ubuntu


Skip to content

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.

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-based distributions such as Ubuntu and Linux Mint.

TecMint Weekly Newsletter
Get the Learn Linux 7 Days Crash Course free when you join 34,000+ Linux professionals reading every Thursday.
Check your email for a magic link to get started.
Something went wrong. Please try again.

Installing build-essential on Ubuntu

To install ImageMagick from the 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 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 https://imagemagick.org/archive/ImageMagick.tar.gz

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

tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.1.1-30

ImageMagick Compilation and Installation

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

./configure 

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
OR
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 shown how to install ImageMagick 7 from sources in Debian and Ubuntu. Use the comment form below to ask any questions or give us feedback.

If this article helped, share it with someone on your team.
TecMint Weekly Newsletter
Get the Learn Linux 7 Days Crash Course free when you join 34,000+ Linux professionals reading every Thursday.
Check your email for a magic link to get started.
Something went wrong. Please try again.
TecMint has been free for 14 years. Help keep it that way.
Google AI Overviews and tools like ChatGPT have cut into search traffic for independent tech sites like TecMint. Running this site costs over $2,000 every month for hosting, infrastructure, and paying authors to keep the content accurate and tested.

If this article helped you solve a problem, consider buying a coffee. It helps keep TecMint free, supports the authors, and keeps the project going.
☕ Buy Me a Coffee
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.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

20 Comments

Leave a Reply
  1. Very clear instructions – worked perfectly – thank you, Aaron!

    Reply
  2. The download link for ImageMagick not working now…

    Reply
    • @Richard,

      I have updated the ImageMagick download links…

      Reply
  3. Installing ImageMagick 7 in Linux from source is a pain because there are lots of optional packages needed to support all of ImageMagick’s “delegates” (image formats). The compile will succeed, but the resulting install will be missing support for common formats (PNG, TIFF, etc.).

    I *strongly* suggest using ImageMagick Easy Install (IMEI):

    https://github.com/SoftCreatR/imei/

    Not only does it take care of all this for you, but it can also incrementally update your local install after the initial installation.

    Reply
  4. Other than having to run ‘apt-get install wget‘ the tutorial worked great. Thanks

    Reply
  5. What about adding delegates so it can handle other image types?

    Reply
  6. If you face a problem running `./configure` with a GCC error, please run `sudo apt install gcc` and repeat `./configure` step.

    Reply
  7. Hey, thanks for you how to. It worked fine for me. I always tried to have the V7. instead of the 6.9 that came with the distribution.

    Reply
  8. How do you delete ImageMagick? I have done all the methods like apt-get remove –purge imagemagick or enter the ImageMagick XXXX folder and run make clean but ImageMagick still does not disappear.

    Reply
    • @riko

      Please cd into the installation directory and run the following command to remove ImageMagic7 from the system.

      # cd ImageMagick-*/
      # make clean
      
      Reply
      • It was only showing the folder. where is application ?

        Reply
  9. Hello!

    Is it safe to delete the directory ~/Dowloads/ImageMagick-x.x.x-xx?

    Thank you for this tutorial.

    Reply
    • @2Pac

      You can delete it once you have successfully installed the package.

      Reply
  10. It didn’t work for me.

    After “sudo make install
    appear this:

    make all-am
    make[1]: Entering directory '/home/vieira/ImageMagick-7.0.10-6'
     CCLD MagickCore/libMagickCore-7.Q16HDRI.la
    /home/vieira/miniconda3/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../..
    /x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lpng12
    collect2: error: ld returned 1 exit status
    make[1]: *** [Makefile:6937: MagickCore/libMagickCore-7.Q16HDRI.la] Error 1
    make[1]: Leaving directory '/home/vieira/ImageMagick-7.0.10-6'
    make: *** [Makefile:5988: all] Error 2
    
    Reply
  11. Please how do i uninstall?

    Reply
    • @Kehinde,

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

      # make clean
      
      Reply
    • cd into the installation folder and run:

      $ sudo make uninstall
      
      Reply
  12. 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?

    Reply
    • 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

      Reply
    • Hey Clive, I just came by to thank you for this amazing solution. I was having the same problem that Joao Vieira and this helped me to conclude the installation and let me verified. Thank you very much.

      Reply

Got Something to Say? Join the Discussion... Cancel reply

Free Course
Get a free Linux course before you go.
Subscribe to TecMint Weekly and get the Learn Linux 7 Days Crash Course free. Read by 34,000+ Linux professionals every Thursday.
Check your email for a magic link to get started.