Can't locate CPAN.pm && Can't locate LWP/UserAgent.pm

Can't locate LWP/UserAgent.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 ./web_shengji.pl line 2.

BEGIN failed--compilation aborted at ./web_shengji.pl line 2.

Can't locate CPAN.pm in @INC (@INC contains: inc /usr/local/lib64/perl5 /usr....

os:CentOS release 6.5 

在部署mysql 5.6 MHA执行到perl Makefile.PL的时候,报错Can't locate ExtUtils/Embed.pm in @INC (@INC contains: /usr/local/lib64/perl5......

解决办法:
yum install cpan -y
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker -y
cpan ExtUtils::Install

如果不想用cpan安装,那就使用下面这条命令
yum install perl-ExtUtils-Embed -y



Can't locate LWP/UserAgent.pm

Can't locate LWP/UserAgent.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at hot_mover10.pl line 7.
BEGIN failed--compilation aborted at hot_mover10.pl line 7.

解决办法

[root@HP07110086 newbin]# perl -MCPAN -eshell  
cpan> install Bundle::LWP



你可能感兴趣的:(Linux)