thanos1983 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I am trying to install Image::Magick and I have spend way too many hours without any solution.

I have installed perlmagick successfully see bellow:

$ sudo apt-get install perlmagick Reading package lists... Done Building dependency tree Reading state information... Done perlmagick is already the newest version (8:6.8.9.9-7ubuntu5.6). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

But when I am trying to install Image::Magick through CPAN I get these errors:

cpan[1]> install Image::Magick Reading '/home/tinyos/.cpan/Metadata' Database was generated on Tue, 11 Apr 2017 07:53:44 GMT Running install for module 'Image::Magick' Checksum for /home/tinyos/.cpan/sources/authors/id/J/JC/JCRISTY/PerlMa +gick-6.89-1.tar.gz ok Scanning cache /home/tinyos/.cpan/build for sizes ...................................................................... +.-----DONE DEL(1/2): /home/tinyos/.cpan/build/PerlMagick-6.89-4 DEL(2/2): /home/tinyos/.cpan/build/PerlMagick-6.89-4.yml Configuring J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Image::Magick Writing MYMETA.yml and MYMETA.json JCRISTY/PerlMagick-6.89-1.tar.gz /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/bin/perl Makefile.PL I +NSTALLDIRS=site -- OK Running make for J/JC/JCRISTY/PerlMagick-6.89-1.tar.gz cp Magick.pm blib/lib/Image/Magick.pm AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick) Running Mkbootstrap for Magick () chmod 644 "Magick.bs" "/home/tinyos/perl5/perlbrew/perls/perl-5.20.1/bin/perl" -MExtUtils::C +ommand::MM -e 'cp_nonempty' -- Magick.bs blib/arch/auto/Image/Magick/ +Magick.bs 644 "/home/tinyos/perl5/perlbrew/perls/perl-5.20.1/bin/perl" "/home/tinyos +/perl5/lib/perl5/ExtUtils/xsubpp" -typemap '/home/tinyos/perl5/perlb +rew/perls/perl-5.20.1/lib/5.20.1/ExtUtils/typemap' -typemap '/home/ti +nyos/.cpan/build/PerlMagick-6.89-4/typemap' Magick.xs > Magick.xsc mv Magick.xsc Magick.c cc -c -I/usr/local/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 - +DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/I +mageMagick-6" -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I +/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/ +include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -D +MAGICKCORE_QUANTUM_DEPTH=16 -O2 -DVERSION=\"6.89\" -DXS_VERSION=\"6 +.89\" -fPIC "-I/home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20 +.1/x86_64-linux/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c rm -f blib/arch/auto/Image/Magick/Magick.so LD_RUN_PATH="/usr/local/lib:/usr/lib/x86_64-linux-gnu" cc -L/usr/loca +l/lib -lMagickCore-6.Q16 -shared -O2 -L/usr/local/lib -fstack-protect +or Magick.o -o blib/arch/auto/Image/Magick/Magick.so \ -L/usr/local/lib -lMagickCore-6.Q16 -lperl -lm \ chmod 755 blib/arch/auto/Image/Magick/Magick.so Manifying 1 pod document JCRISTY/PerlMagick-6.89-1.tar.gz /usr/bin/make -- OK Running make test "/home/tinyos/perl5/perlbrew/perls/perl-5.20.1/bin/perl" -MExtUtils::C +ommand::MM -e 'cp_nonempty' -- Magick.bs blib/arch/auto/Image/Magick/ +Magick.bs 644 PERL_DL_NONLAZY=1 "/home/tinyos/perl5/perlbrew/perls/perl-5.20.1/bin/p +erl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::H +arness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/blob.t .......... Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/blob.t line 20. Compilation failed in require at t/blob.t line 20. BEGIN failed--compilation aborted at t/blob.t line 20. &Image::Magick::constant not defined. The required ImageMagick librari +es are not installed or not installed properly. END failed--call queue aborted at t/blob.t line 20. t/blob.t .......... Dubious, test returned 22 (wstat 5632, 0x1600) Failed 1/1 subtests t/composite.t ..... Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/composite.t line 18. Compilation failed in require at t/composite.t line 18. BEGIN failed--compilation aborted at t/composite.t line 18. &Image::Magick::constant not defined. The required ImageMagick librari +es are not installed or not installed properly. END failed--call queue aborted at t/composite.t line 18. t/composite.t ..... Dubious, test returned 22 (wstat 5632, 0x1600) Failed 18/18 subtests t/filter.t ........ Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/filter.t line 21. Compilation failed in require at t/filter.t line 21. BEGIN failed--compilation aborted at t/filter.t line 21. t/filter.t ........ 1/58 &Image::Magick::constant not defined. The req +uired ImageMagick libraries are not installed or not installed proper +ly. END failed--call queue aborted at t/filter.t line 21. t/filter.t ........ Dubious, test returned 22 (wstat 5632, 0x1600) Failed 58/58 subtests t/getattribute.t .. Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/getattribute.t line 20. Compilation failed in require at t/getattribute.t line 20. BEGIN failed--compilation aborted at t/getattribute.t line 20. t/getattribute.t .. 1/25 &Image::Magick::constant not defined. The req +uired ImageMagick libraries are not installed or not installed proper +ly. END failed--call queue aborted at t/getattribute.t line 20. t/getattribute.t .. Dubious, test returned 22 (wstat 5632, 0x1600) Failed 25/25 subtests t/montage.t ....... Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/montage.t line 20. Compilation failed in require at t/montage.t line 20. BEGIN failed--compilation aborted at t/montage.t line 20. &Image::Magick::constant not defined. The required ImageMagick librari +es are not installed or not installed properly. END failed--call queue aborted at t/montage.t line 20. t/montage.t ....... Dubious, test returned 22 (wstat 5632, 0x1600) Failed 19/19 subtests t/ping.t .......... Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/ping.t line 20. Compilation failed in require at t/ping.t line 20. BEGIN failed--compilation aborted at t/ping.t line 20. t/ping.t .......... 1/2 &Image::Magick::constant not defined. The requ +ired ImageMagick libraries are not installed or not installed properl +y. END failed--call queue aborted at t/ping.t line 20. t/ping.t .......... Dubious, test returned 22 (wstat 5632, 0x1600) Failed 2/2 subtests t/read.t .......... Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/read.t line 20. Compilation failed in require at t/read.t line 20. BEGIN failed--compilation aborted at t/read.t line 20. &Image::Magick::constant not defined. The required ImageMagick librari +es are not installed or not installed properly. END failed--call queue aborted at t/read.t line 20. t/read.t .......... Dubious, test returned 22 (wstat 5632, 0x1600) Failed 47/47 subtests t/setattribute.t .. Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/setattribute.t line 20. Compilation failed in require at t/setattribute.t line 20. BEGIN failed--compilation aborted at t/setattribute.t line 20. t/setattribute.t .. 1/71 &Image::Magick::constant not defined. The req +uired ImageMagick libraries are not installed or not installed proper +ly. END failed--call queue aborted at t/setattribute.t line 20. t/setattribute.t .. Dubious, test returned 22 (wstat 5632, 0x1600) Failed 71/71 subtests t/write.t ......... Can't load '/home/tinyos/.cpan/build/PerlMagick-6. +89-4/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: + /usr/local/lib/libMagickCore-6.Q16.so.4: undefined symbol: DrawPathS +tart at /home/tinyos/perl5/perlbrew/perls/perl-5.20.1/lib/5.20.1/x86_ +64-linux/DynaLoader.pm line 193. at t/write.t line 21. Compilation failed in require at t/write.t line 21. BEGIN failed--compilation aborted at t/write.t line 21. t/write.t ......... 1/32 &Image::Magick::constant not defined. The req +uired ImageMagick libraries are not installed or not installed proper +ly. END failed--call queue aborted at t/write.t line 21. t/write.t ......... Dubious, test returned 22 (wstat 5632, 0x1600) Failed 32/32 subtests Test Summary Report ------------------- t/blob.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 t/composite.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 18 tests but ran 1. t/filter.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 58 tests but ran 1. t/getattribute.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 25 tests but ran 1. t/montage.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 19 tests but ran 1. t/ping.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 2 tests but ran 1. t/read.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 47 tests but ran 1. t/setattribute.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 71 tests but ran 1. t/write.t (Wstat: 5632 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 22 Parse errors: Bad plan. You planned 32 tests but ran 1. Files=9, Tests=9, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.09 cusr + 0.02 csys = 0.15 CPU) Result: FAIL Failed 9/9 test programs. 9/9 subtests failed. Makefile:1020: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 22 JCRISTY/PerlMagick-6.89-1.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports JCRISTY/PerlMagick-6.89-1.tar.gz

Does any one faced similar error and know how to resolve it?

I am running on LinuxOS:

Linux localhost 4.4.0-73-generic #94-Ubuntu SMP Thu Apr 6 13:38:37 UTC + 2017 x86_64 x86_64 x86_64 GNU/Linux

Perl Version:

$ perl -v This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-li +nux (with 1 registered patch, see perl -V for more detail) Copyright 1987-2014, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.

If you require any further information let me know.

Seeking for Perl wisdom...on the process of learning...not there...yet!
  • Comment on The required ImageMagick libraries are not installed or not installed properly. [SOLVED]
  • Select or Download Code

Replies are listed 'Best First'.
Re: The required ImageMagick libraries are not installed or not installed properly.
by hippo (Archbishop) on Apr 11, 2017 at 12:14 UTC
    Does any one faced similar error and know how to resolve it?

    Is there some reason why you didn't simply

    sudo apt-get install libimage-magick-perl

    Since you installed perlmagick from a package why not go the whole hog?

      Hello hippo,

      Unfrotunately for me I have also installed, see log bellow:

      $ sudo apt-get install libimage-magick-perl [sudo] password for tinyos: Reading package lists... Done Building dependency tree Reading state information... Done libimage-magick-perl is already the newest version (8:6.8.9.9-7ubuntu5 +.6). libimage-magick-perl set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

      But I still get the error. Any other ideas? :(

      Seeking for Perl wisdom...on the process of learning...not there...yet!

        If you have already installed libimage-magick-perl why are you trying to install the same thing again except via CPAN?

Re: The required ImageMagick libraries are not installed or not installed properly.
by stevieb (Canon) on Apr 11, 2017 at 14:00 UTC

    I wrote a distribution that uses the software, and here's what I did to get the Perl distribution to install:

    # download: http://www.imagemagick.org/download/ tar xvfz ImageMagick-6.9.2-4.tar.gz cd ImageMagick-6.9.2-4/ ./configure --with-perl sudo apt-get install libperl-dev make sudo make install cpanm Image::Magick

      Hello stevieb,

      I tried this approach before I am getting the same error. I also tried with cpanm to install the module same error. :(

      I have even tried with ./configure --with-perl from (Make error on PerlMagick 6.8.6).

      Seeking for Perl wisdom...on the process of learning...not there...yet!
        Installing PerlMagick on a Linux OS is as easy as it comes. You said you installed the pre-requisite ImageMagick libs with your package manager, but you probably are missing a libmagick-devel package. I just don't know why so many package managers split the runtime and devel packages. It causes so much confusion.

        The way I always do it, is manually. No package managers needed. It always works. My approach is similar to stevieb's but a bit different.

        First, get the latest ImageMagick source tar ball, currently at IM source tar ball . Then tar -xvf ImageMagick.tar.gz. Then cd into the directory and just do ./configure and then "make" , then "sudo make install", or just make install as root. IM will install itself to it's default location in /usr/local and put all the needed files in the proper place. Then as root do a "ldconfig" to make sure the new libraries are loaded.

        Then download the PerlMagick module from cpan, currently at PerlMagick , unpack it, cd into it, and do "perl Makefile.PL" then "make" then as root "make install". Report back here any errors you encounter.

        My above procedure is the age-old standard foolproof way of manually installing libs and modules. You can manually install any module you want without the problems associated with package managers. You can install GD by the same procedure, it's just the standard way described in the README's of the libraries.The PerlMagick and ImageMagick module and library are of the highest quality as far as being bugfree. They always compile and install cleanly. Good luck.


        I'm not really a human, but I play one on earth. ..... an animated JAPH

        I normally wouldn't recommend this, but I tried it again on another machine using my above method and the cpan install failed. However, if I use force to install, and the functionality appears to work correctly.