Installation of Image::Magick under Debian

Table of contents

Installation of Image::Magick under Debian
Debian and Fonts
Sample code

Installation of Image::Magick under Debian


Image::Magick can be very difficult to install, so this article shows how to compile from source.

If you can use Debian's packaging system, that's often the easiest way, but of course limits you to whatever version is available from Debian's repo. The steps are:

        shell> aptitude install ImageMagick
        shell> cpanm Image::Magick

I did not use that method myself, but I do suggest you try it before the instructions herein.

Also, there is Alien::ImageMagick. However, using that module still requires ImageMagick to be compiled, and may well require Perl itself to be re-compiled, so be sure to scrutinize the instructions before attempting it.


o Preparation

shell> sudo aptitude install libpng12-dev libgraphviz-dev libjpeg8-dev libfreetype6-dev

o Download

o Click on Files (on the left)
o Change the branch to ImageMagick-6
o Don't click on 'Download Zip' but do click on the down-arrowhead beside it
o Click on Download tar.bz2
o In your shell, go to ~/Downloads
o Observe ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar.bz2

mv ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar.bz2 ImageMagick

cd ImageMagick

bunzip2 ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar.bz2

tar xvf ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de.tar

cd ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de

o Remove '-lperl' from these 3 files...

vi PerlMagick/ PerlMagick/default/ PerlMagick/quantum/

o Double check...

ack lperl

o Install


./configure --with-gnu-ld --with-perl


sudo make install

dir /usr/local/lib

o Observe /usr/local/lib/ImageMagick-6.9.3/
o Test

convert -version


        Version: ImageMagick 6.9.3-0 Q16 x86_64 2015-12-27
        Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
        Features: Cipher DPC OpenMP
        Delegates (built-in): fontconfig freetype gvc jng jpeg pangocairo png x xml zlib

convert logo: logo.gif

identify logo.gif


logo.gif GIF 640x480 640x480+0+0 8-bit sRGB 256c 28.6KB 0.000u 0:00.000

o Test Image::Magic

perl -e 'use Image::Magick; print Image::Magick->QuantumDepth,"\n"'



o Clean up

cd ..

rm ImageMagick-ImageMagick-6-9043f3d1fb76c8f4f158d75dc6e2455c43d2f1de/


o To use Image::Magick

Debian and Fonts

If you're using Debian, run fc-list for a list of installed fonts.

More information on Debian's support for fonts can be found on Debian's wiki.

Sample code


Ron Savage. 2015-12-30.