December 15, 2022

How to install latest ImageMagick & Imagick on Ubuntu

Back to Solutions

ImageMagick has evolved in terms for performance but the ubuntu package is still stuck on version 6.X. This is a quick guide on how to install and compile it on your own.

1.0 Remove the old version of ImageMagick & Imagick

sudo apt remove --purge imagemagick

2.0 Install Delegates & Modules.

sudo apt-get update && apt-get install -y -qq \
build-essential chrpath debhelper dh-exec dpkg-dev g++ ghostscript gsfonts libbz2-dev \
libdjvulibre-dev libexif-dev libfftw3-dev libfontconfig1-dev libfreetype6-dev \
libjpeg-dev liblcms2-dev liblqr-1-0-dev libltdl-dev liblzma-dev libopenexr-dev \
libpango1.0-dev libperl-dev libpng-dev librsvg2-bin librsvg2-dev libtiff-dev libwebp-dev \
libwmf-dev libx11-dev libxext-dev libxml2-dev libxt-dev pkg-config pkg-kde-tools zlib1g-dev

3.0 Install ImageMagick from source.

git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick-7.1.1
cd ImageMagick-7.1.1
./configure --with-rsvg --with-modules
make
sudo make install
sudo ldconfig /usr/local/lib

4.0 Install Imagick from source

git clone https://github.com/Imagick/imagick
cd imagick
phpize && ./configure
make
make install

5.0 Enable Imagick for PHP

Add the following line at the end your php.ini file

extension=imagick.so

6.0 Restart the server

To check if everything is enabled, you can create a php file with <?php phpinfo() ?> inside and look for Imagick

If you are having trouble installing it, our team can install them for you and get you up and running!

Was this solution helpful?

Related Solutions

7-Day Website

Professional site, live in one week. Built to convert visitors into customers.

Your website. Live in 7 days or less. Starting at $999.

Enterprise Solutions

Complex requirements? We've built platforms handling 10M+ requests daily.

Let's architect something your competitors can't copy.

GemPixel