Objective

The objective is to install ImageMagick 7 on Ubuntu 18.04 Linux.

Operating System and Software Versions

  • Operating System: - Ubuntu 18.04 Bionic Beaver Linux
  • Software: - ImageMagick 7.0.7-38 or higher

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - given linux commands to be executed as a regular non-privileged user

Instructions

In this article we will be compiling and installing the latest ImageMagick 7 on Ubuntu 18.04 Linux from source code. Firstly, we will install all compilation dependencies, followed by ImageMagick's source code compilation and subsequent installation.

Lastly, we will perform a check to see whether ImageMagick was installed correctly.

ImageMagick Compilation Dependencies

First step is to install all compilation dependencies. This will allow us to compile ImageMagick. In most cases the installation of the build-essential package shold be sufficient.

However, I ran into some issues while doing a final installation check. Although installation of the build-essential package allows for a correct compilation, downloading full dependencies based on Ubuntu's imagemagick package seem to be better way to go.

First, enable the source packages within the /etc/apt/sources.list file by uncommenting deb-src of Ubuntu's main repository as shown below:


Enable Source package repository on Ubuntu 18.04
Enable Source package repository on Ubuntu 18.04
When ready execute:
$ sudo apt update
$ sudo apt build-dep imagemagick
Now it's time to download the ImageMagick source code.

Download ImageMagick Source files

At this stage we are ready to download and extract the ImageMagick latest source code using the wget command and extract its content:
$ wget https://www.imagemagick.org/download/ImageMagick.tar.gz
$ tar xf ImageMagick.tar.gz
$ cd ImageMagick-7*
Download and Extract ImageMagick source code
Download and Extract ImageMagick source code.


ImageMagick Compilation and Installation

While still in the ImageMagick's source code directory execute the configure command to perform a compilation configuration and to make sure that all compilation dependencies are met:
$ ./configure
ALTTEXT
You should not see any errors after running the ./configure command .
Next, execute the make command to perform the compilation:
$ make
ImageMagick 7 compilation on Ubuntu 18.04.
ImageMagick 7 compilation on Ubuntu 18.04. Depending on your system this might take a while. No errors should be reported. Warnings are OK.
Lastly, install ImageMagick by executing:
$ sudo make install
The above command will install all previously compiled ImageMagick binaries on your system. Run ldconfig to link static libraries:
$ sudo ldconfig /usr/local/lib
All done.


Confirm installation and final check

Now, we are ready to check the ImageMagick installation. Execute the indentify command to confirm the installed version:
$ identify -version
ImageMagick 7 installed on Ubuntu 18.04
ImageMagick 7 installed on Ubuntu 18.04. Take a note of the version number generated by the identify command.
Optionaly run more in-depth installation check. Why still in the ImageMagick source code directory execute:
$ make check
Final ImageMagick installation Testsuite check results on Ubuntu 18.04
Final ImageMagick installation check results on Ubuntu 18.04. All seems to be in order.
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME or create a JOB ALERT on LinuxCareers.com job portal.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.