Image :: Magick安装错误127

时间:2013-11-17 04:43:36

标签: perl ubuntu makefile imagemagick cpan

当我尝试在Ubuntu系统上通过CPAN安装Image :: Magick时,出现127错误。我不知道出了什么问题。以下是我得到的文字:

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 个答案:

答案 0 :(得分:2)

错误在于:

/bin/sh: 1: cc: not found

尝试:

sudo apt-get install build-essential

从CPAN安装之前。

您需要最新版本吗?你应该能够使用apt-get获得一个稍微旧版本的版本。

答案 1 :(得分:0)

我认为你应该尝试在Ubuntuas上为Perl安装ImageMagick,而不是通过Cpan:

sudo apt-get install perlmagick