2017-03-01 178 views
0

这是我的输出,有什么建议吗?我已经尝试通过perl -MCPAN -e shell进行安装,然后强制安装DBI。安装DBI Perl模块时出错

cpan[10]> force install DBI 
Running install for module 'DBI' 
Running make for T/TI/TIMB/DBI-1.636.tar.gz 
    Has already been unwrapped into directory /root/.cpan/build/DBI-1.636-sGWX9V 

    CPAN.pm: Building T/TI/TIMB/DBI-1.636.tar.gz 

gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"1.636\" -DXS_VERSION=\"1.636\" -fPIC "-I/usr/lib64/perl5/CORE" -W -Wall -Wpointer-arith -Wbad-function-cast -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter Perl.c 
/bin/sh: gcc: command not found 
make: *** [Perl.o] Error 127 
    TIMB/DBI-1.636.tar.gz 
    /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: 
TIMB/DBI-1.636.tar.gz      : make NO 
+0

使用fedora 20,你能推荐我一个C编译器和安装程序吗?我确认安装了“make”。 – adamz88

+1

Erm,[gcc](https://gcc.gnu.org/install/)? – Borodin

+0

你几乎不应该使用强制选项。它所做的就是跳过失败的测试,这意味着即使安装成功,它可能已经损坏。 – ThisSuitIsBlackNot

回答

4

错误消息:

/bin/sh: gcc: command not found 

所以你需要安装gcc

+0

这样做。谢谢。 – adamz88

3

正如你已经看到的,安装gcc将解决这个问题。

但我想知道为什么你不使用预打包版本。

$ sudo yum install perl-DBI 

另外,你是否意识到Fedora 20现在不受支持?我强烈建议你升级到支持的版本(Fedora 24或25)。