How to Install ImageMagick 7 on Ubuntu 19.04

Installation of ImageMagick 7 from source code On Ubuntu 19.04

Procedure:

Install related development tool to compile “build-essential” to install ImageMagick

Download the ImageMagick

Configure and built the program or package

ldconfig /usr/local/lib

Check the version of magick

Download Link:

https://www.imagemagick.org/download/ImageMagick.tar.gz

Installation

Install the build-essential tool to compile the source code.

root@linuxhelp:~# apt install build-essential -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.6ubuntu1).
build-essential set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.

Download the ImageMagick from the source code using the below-given link.

root@linuxhelp:~# wget https://www.imagemagick.org/download/ImageMagick.tar.gz
--2019-05-21 14:24:01--  https://www.imagemagick.org/download/ImageMagick.tar.gz
Resolving www.imagemagick.org (www.imagemagick.org)... 198.72.81.86
Connecting to www.imagemagick.org (www.imagemagick.org)|198.72.81.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13724633 (13M) [application/x-gzip]
Saving to: ‘ImageMagick.tar.gz’

ImageMagick.tar.gz            100%[================================================>]  13.09M   489KB/s    in 43s 


2019-05-21 14:24:45 (313 KB/s) - ‘ImageMagick.tar.gz’ saved [13724633/13724633]

Once the download is complete.Extract the tar file of ImageMAgick .

root@linuxhelp:~# tar xvzf ImageMagick.tar.gz 
ImageMagick-7.0.8-46/
ImageMagick-7.0.8-46/Install-unix.txt
ImageMagick-7.0.8-46/ChangeLog
ImageMagick-7.0.8-46/winpath.sh
ImageMagick-7.0.8-46/index.html
ImageMagick-7.0.8-46/NOTICE
.
.
.
.
ImageMagick-7.0.8-46/www/mogrify.html
ImageMagick-7.0.8-46/www/gradient.html
ImageMagick-7.0.8-46/www/install-source.html
ImageMagick-7.0.8-46/version.sh
ImageMagick-7.0.8-46/aclocal.m4
ImageMagick-7.0.8-46/Install-mac.txt
ImageMagick-7.0.8-46/README.txt

List the contents to view the extracted file of ImageMagick.

root@linuxhelp:~# ll
total 67640
drwx------  5 root root     4096 May 21 14:29 ./
drwxr-xr-x 20 root root     4096 May 21 14:07 ../
-rw-------  1 root root     1397 May 21 14:18 .bash_history
-rw-r--r--  1 root root     3106 Aug  7  2018 .bashrc
drwx------  2 root root     4096 Apr 17 00:34 .cache/
drwxrwxr-x 15 1002 1002     4096 May 19 18:26 ImageMagick-7.0.8-46/
-rw-r--r--  1 root root 13724633 May 19 18:29 ImageMagick.tar.gz
-rw-------  1 root root       62 May 16 16:44 .mysql_history
-rw-r--r--  1 root root      116 May 16 16:32 .pearrc
-rw-r--r--  1 root root      148 Aug  7  2018 .profile
-rw-------  1 root root      799 May 21 14:17 .viminfo
-rw-r--r--  1 user user 55491492 Sep  4  2018 VMwareTools-10.3.2-9925305.tar.gz
drwxr-xr-x  9 root root     4096 Sep  4  2018 vmware-tools-distrib/

Change the directory to ImageMagick.

root@linuxhelp:~# cd ImageMagick-7.0.8-46/

Run the following command to check the dependencies that are required to compile the source code.

root@linuxhelp:~/ImageMagick-7.0.8-46# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
.
.
.
.
.
CC              = gcc
    CFLAGS          =  -fopenmp -g -O2 -Wall -mtune=sandybridge -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
    CPPFLAGS        =   -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
    PCFLAGS         = 
    DEFS            = -DHAVE_CONFIG_H
    LDFLAGS         = 
    LIBS            =                                        -lm    
    CXX             = g++
    CXXFLAGS        = -g -O2 -pthread
    FEATURES        = DPC HDRI Cipher OpenMP
    DELEGATES       = mpeg ps
==============================================================================

Run make command to built the software.

root@linuxhelp:~/ImageMagick-7.0.8-46# make
make  all-am
make[1]: Entering directory '/root/ImageMagick-7.0.8-46'
  CC       utilities/magick.o
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-accelerate.lo
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-animate.lo
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-annotate.lo
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-artifact.lo
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-attribute.lo
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-blob.lo
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-cache.lo
  CC       MagickCore/libMagickCore_7_Q16HDRI_la-cache-view.lo
.
.
.
CXX      Magick++/lib/libMagick___7_Q16HDRI_la-Thread.lo
  CXX      Magick++/lib/libMagick___7_Q16HDRI_la-TypeMetric.lo
  CXXLD    Magick++/lib/libMagick++-7.Q16HDRI.la
ar: `u' modifier ignored since `D' is the default (see `U')
cp -f MagickCore/ImageMagick.pc MagickCore/ImageMagick-7.Q16HDRI.pc
cp -f MagickCore/MagickCore.pc MagickCore/MagickCore-7.Q16HDRI.pc
cp -f MagickWand/MagickWand.pc MagickWand/MagickWand-7.Q16HDRI.pc
cp -f Magick++/lib/Magick++.pc Magick++/lib/Magick++-7.Q16HDRI.pc
make[1]: Leaving directory '/root/ImageMagick-7.0.8-46'

Run the make install and configure the dynamic linker run-time bindings as follows.

root@linuxhelp:~/ImageMagick-7.0.8-46# make install
make  install-am
make[1]: Entering directory '/root/ImageMagick-7.0.8-46'
make[2]: Entering directory '/root/ImageMagick-7.0.8-46'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   MagickCore/libMagickCore-7.Q16HDRI.la MagickWand/libMagickWand-7.Q16HDRI.la Magick++/lib/libMagick++-7.Q16HDRI.la '/usr/local/lib'
libtool: install: /usr/bin/install -c MagickCore/.libs/libMagickCore-7.Q16HDRI.so.6.0.0 /usr/local/lib/libMagickCore-7.Q16HDRI.so.6.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libMagickCore-7.Q16HDRI.so.6.0.0 libMagickCore-7.Q16HDRI.so.6 || { rm -f libMagickCore-7.Q16HDRI.so.6 && ln -s libMagickCore-7.Q16HDRI.so.6.0.0 libMagickCore-7.Q16HDRI.so.6; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libMagickCore-7.Q16HDRI.so.6.0.0 libMagickCore-7.Q16HDRI.so || { rm -f libMagickCore-7.Q16HDRI.so && ln -s libMagickCore-7.Q16HDRI.so.6.0.0 libMagickCore-7.Q16HDRI.so; }; })
libtool: install: /usr/bin/install -c MagickCore/.libs/libMagickCore-7.Q16HDRI.lai /usr/local/lib/libMagickCore-7.Q16HD
.
.
.
.
/usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 MagickCore/ImageMagick.pc MagickCore/MagickCore.pc MagickCore/ImageMagick-7.Q16HDRI.pc MagickCore/MagickCore-7.Q16HDRI.pc MagickWand/MagickWand.pc MagickWand/MagickWand-7.Q16HDRI.pc Magick++/lib/Magick++.pc Magick++/lib/Magick++-7.Q16HDRI.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/root/ImageMagick-7.0.8-46'
make[1]: Leaving directory '/root/ImageMagick-7.0.8-46'
root@linuxhelp:~/ImageMagick-7.0.8-46# ldconfig /usr/local/lib

Once it is installed, you shall check the version of the ImageMagick with the following command

root@linuxhelp:~/ImageMagick-7.0.8-46# magick -version
Version: ImageMagick 7.0.8-46 Q16 x86_64 2019-05-21 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP(4.5) 
Delegates (built-in):

Therefore, the installation Of ImageMagick 7 on Ubuntu 19.04 from source code comes to end.

Comment
sarab2oo8
Apr 15 2020
@deiffferrari try sudo make install
deiffferrari
Sep 12 2019
Preciso de ajuda ! Ubuntu 18.04.
Erros

convert: no decode delegate for this image format `JPG' @ error/constitute.c/ReadImage/560.
convert: no images defined `saida.pdf' @ error/convert.c/ConvertImageCommand/3273.
Add a comment
FAQ
Q
What does Dynamic binding mean in ImageMagick 7 v?
A
Dynamic binding is the process of linking procedure call to a specific sequence code at run-time, which means that a code to be executed for a specific procedure call is not known until run-time In ImageMagick 7v.
Q
What does shared library mean in ImageMagick 7v?
A
A shared library or Dynamic library are loaded when a program is launched and loaded into memory and binding occurs at a run time In ImageMagick 7v
Q
What is the use of dynamic linker In ImageMagick 7 v?
A
Dynamic linker is a special part of operating system that loads external shared librarues into a running process and then binds those shared libraries dynamically to the running process In ImageMAgick.
Q
How many image formats can ImageMagick read and write?
A
ImageMagick can read and write over 200 image file formats.
Q
What is ImageMagick 7v Used for?
A
Imagemagick is a free and open source software suite for displaying,converting and editing raster image and vector image files.