安装 Perl 模块时遇到问题:: Make 返回了错误状态,安装似乎是不可能的



美好的一天 - 我在安装 perl 模块时仍然遇到问题 生成文件似乎存在问题。我试图弄清楚我的笔记本上出了什么问题。

cpan[1]> install  Data::Dumper
Running install for module 'Data::Dumper'
Running make for S/SM/SMUELLER/Data-Dumper-2.161.tar.gz
Fetching with LWP:
http://mirrors.hostingromania.ro/cpan.org/authors/id/S/SM/SMUELLER/Data-Dumper-2.161.tar.gz
Fetching with LWP:
http://mirrors.hostingromania.ro/cpan.org/authors/id/S/SM/SMUELLER/CHECKSUMS
Checksum for /home/martin/.cpan/sources/authors/id/S/SM/SMUELLER/Data-Dumper-2.161.tar.gz ok
CPAN.pm: Building S/SM/SMUELLER/Data-Dumper-2.161.tar.gz
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Data::Dumper
Writing MYMETA.yml and MYMETA.json
cp Dumper.pm blib/lib/Data/Dumper.pm
Running Mkbootstrap for Dumper ()
chmod 644 "Dumper.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Dumper.bs blib/arch/auto/Data/Dumper/Dumper.bs 644
"/usr/bin/perl" "/usr/lib/perl5/5.18.2/ExtUtils/xsubpp"  -typemap '/usr/lib/perl5/5.18.2/ExtUtils/typemap'  Dumper.xs > Dumper.xsc
mv Dumper.xsc Dumper.c
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 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe   -DVERSION="2.161" -DXS_VERSION="2.161" -fPIC "-I/usr/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE"  -DUSE_PPPORT_H Dumper.c
/bin/sh: cc: Kommando nicht gefunden.
Makefile:332: recipe for target 'Dumper.o' failed
make: *** [Dumper.o] Error 127
SMUELLER/Data-Dumper-2.161.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:
SMUELLER/Data-Dumper-2.161.tar.gz            : make NO
cpan[2]> 

好吧 - 我需要确保正确设置制作..美好的一天 - 我在安装 Perl 模块时仍然遇到问题 生成文件似乎存在问题。我试图弄清楚我的笔记本上出了什么问题。

构建该模块需要C编译器,但是使用perl构建的C编译器"cc"不可用。您需要先安装它。

但是 Data::D umper 是标准 perl 发行版的一部分,所以你无论如何都不需要安装它。如果你使用的是 Linux 发行版,其中 perl 安装已被拆分为多个包,那么您可能只需要执行以下操作:

yum install perl-data-dumper

最新更新