Knowledge Base

How to install latest ImageMagick & Imagick on Ubuntu

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

Don't forget to add extension=imagick.so into your php.ini

5.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 helpful? 😃 😞

Still have questions?

If you still have questions, feel free to open a ticket and we will gladly help you out!

Open a ticket