无法安装perl模块opensuse 12.2

时间:2012-10-25 18:12:24

标签: perl cpan perl-module opensuse ppm

我一直在尝试在我的全新Opensuse安装上安装几个perl模块,但无济于事。我试图通过CPAN,PPM和手动安装它们,但仍然会出现同样的错误:

 Unparsable version '' for prerequisite Test at Makefile.PL line 4.
尽管如此,Makefile.PL似乎能够毫无问题地执行,但随后的执行会导致问题。这是导致我认为问题的信息:

 make: *** [LevenshteinXS.o] Error 127
 JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz
 /usr/bin/make -- NOT OK

我试图做whereis make,结果似乎没问题:

 make: /usr/bin/make /usr/bin/X11/make /usr/share/man/man1/make.1.gz /usr/share/man/man1p/make.1p.gz

这是cpan在告诉我安装失败之前所执行的操作的完整重新计算:

 CPAN: Storable loaded ok (v2.34)
 Reading '/home/tito/.cpan/Metadata'
 Database was generated on Wed, 24 Oct 2012 19:07:03 GMT
 Running install for module 'Text::LevenshteinXS'
 Running make for J/JG/JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz
 CPAN: Digest::SHA loaded ok (v5.71)
 CPAN: Compress::Zlib loaded ok (v2.048)
 Checksum for /home/tito/.cpan/sources/authors/id/J/JG/JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz ok
 CPAN: File::Temp loaded ok (v0.22)
 CPAN: Parse::CPAN::Meta loaded ok (v1.4404)
 CPAN: CPAN::Meta loaded ok (v2.120630)

 CPAN.pm: Building J/JG/JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz

 Unparsable version '' for prerequisite Test at Makefile.PL line 4.
 Checking if your kit is complete...
 Looks good
 Writing Makefile for Text::LevenshteinXS
 Writing MYMETA.yml and MYMETA.json
 CPAN: Module::CoreList loaded ok (v2.66)
 cp LevenshteinXS.pm blib/lib/Text/LevenshteinXS.pm
 AutoSplitting blib/lib/Text/LevenshteinXS.pm (blib/lib/auto/Text/LevenshteinXS)
 /usr/bin/perl /usr/lib/perl5/5.16.0/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.16.0/ExtUtils/typemap  LevenshteinXS.xs > LevenshteinXS.xsc && mv LevenshteinXS.xsc LevenshteinXS.c
 Please specify prototyping behavior for LevenshteinXS.xs (see perlxs manual)
 cc -c   -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe   -DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -fPIC "-I/usr/lib/perl5/5.16.0/x86_64-linux-thread-multi/CORE"   LevenshteinXS.c
 /bin/sh: cc: command not found
 make: *** [LevenshteinXS.o] Error 127
 JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz
 /usr/bin/make -- NOT OK
 CPAN: YAML loaded ok (v0.84)
 Running make test
  Can't test without successful make
 Running make install
  Make had returned bad status, install seems impossible

1 个答案:

答案 0 :(得分:7)

关于版本的警告只是一个警告。真正的问题是:

/bin/sh: cc: command not found

换句话说:这个模块需要一个C编译器而你却没有。无论如何,Perl都找不到。从OpenSuSE安装gcc包应该可以解决这个问题。

“不可解析的版本”来自Makefile.PL。

中的这一行
'PREREQ_PM'         => { Test },

PREREQ_PM表示必备模块及其最低版本。 The author forgot the minimum version。没什么大不了的,Test永远带着Perl。