Can’t locate CGI/Carp.pm in @INC (@INC contains: /usr/local/lib64/perl5 错误修复

主机软件博客 提供cPanel/WHMCS/DirectAdmin/Onapp等文章和教程
Main menuSkip to primary contentSkip to secondary contentSearch Can’t locate CGI/Carp.pm in @INC (@INC contains: /usr/local/lib64/perl5 错误修复
Posted on 2012 年 8 月 10 日 by 主机软件 | Leave a reply
[Sat Aug 11 00:14:26.102705 2012] [cgi:error] [pid 5024] [client 222.65.114.1:56282] AH01215: Can’t locate CGI/Carp.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at install.cgi line 3., referer: http://internet.baidu.com/
[Sat Aug 11 00:14:26.102796 2012] [cgi:error] [pid 5024] [client 222.65.114.1:56282] AH01215: BEGIN failed–compilation aborted at install.cgi line 3., referer: http://internet.baidu.com/

这个是因为默认未安装CGI的CARP模块引起的

解决办法
一次性编译安装所有主要模块

wget http://www.cddc.vt.edu/cpan/authors/id/L/LD/LDS/CGI.pm-3.04.tar.gz
tar -zxvf CGI.pm-3.04.tar.gz
cd CGI*
perl Makefile.PL
make
make install

完成后尝试访问CGI页面
OK了吧?

点赞