0

When I try to install Image::Magick via CPAN on an Ubuntu system, I get an 127 error. I have no idea what is going wrong. Below is the text of what I get:

cpan[1]> install Image::Magick
Reading '/root/.cpan/Metadata'
  Database was generated on Fri, 15 Nov 2013 21:17:02 GMT
Running install for module 'Image::Magick'
Running make for J/JC/JCRISTY/PerlMagick-6.86.tar.gz
Checksum for /root/.cpan/sources/authors/id/J/JC/JCRISTY/PerlMagick-6.86.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE

  CPAN.pm: Building J/JC/JCRISTY/PerlMagick-6.86.tar.gz

Checking if your kit is complete...

Looks good

Warning (mostly harmless): No library found for -lMagickCore-6.Q16

Generating a Unix-style Makefile

Writing Makefile for Image::Magick

Writing MYMETA.yml and MYMETA.json

cp Magick.pm blib/lib/Image/Magick.pm

AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick)

/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp  -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap 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/ImageMagick-6" -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/freetype2 -fopenmp -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -O2 -g   -DVERSION=\"6.86\" -DXS_VERSION=\"6.86\" -fPIC "-I/usr/lib/perl/5.14/CORE"  -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c

/bin/sh: 1: cc: not found

make: *** [Magick.o] Error 127

  JCRISTY/PerlMagick-6.86.tar.gz
  /usr/bin/make -- NOT OK

Running make test

  Can't test without successful make

Running make install

  Make had returned bad status, install seems impossible

Failed during this command:

 JCRISTY/PerlMagick-6.86.tar.gz               : make NO
2

2 Answers 2

3

The error is here:

/bin/sh: 1: cc: not found

Try:

sudo apt-get install build-essential

before installing from CPAN.

Do you need the newest version? You should be able to get an only slightly older version with apt-get.

0

I think you should try installing ImageMagick for Perl on Ubuntuas per below, and not via Cpan:

sudo apt-get install perlmagick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.