错误:
[root nagios-plugins-1.4.15]# make
...................make[2]: Entering directory `/usr/local/src/nagios-plugins-1.4.15/perlmods'../tools/build_perl_modules -d /usr/local/nagios/perl -m .Got Test-Simple, with file: Test-Simple-0.70.tar.gzGot Params-Validate, with file: Params-Validate-0.88.tar.gzGot Math-Calc-Units, with file: Math-Calc-Units-1.06.tar.gzGot Class-Accessor, with file: Class-Accessor-0.31.tar.gzGot Config-Tiny, with file: Config-Tiny-2.10.tar.gzGot Nagios-Plugin, with file: Nagios-Plugin-0.34.tar.gzCan't locate ExtUtils/MakeMaker.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 Makefile.PL line 11.BEGIN failed--compilation aborted at Makefile.PL line 11.Can't run perl Makefile.PL at ../tools/build_perl_modules line 68.make[2]: *** [all-local] Error 2make[2]: Leaving directory `/usr/local/src/nagios-plugins-1.4.15/perlmods'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/usr/local/src/nagios-plugins-1.4.15'make: *** [all] Error 2解决办法:
yum install perl-devel perl-CPAN -y
如果在进行编译和安装,还是会报错,需要重新解压,在编译安装,即可。
[root nagios-plugins-1.4.15]# cd
[root ~]# rm -rf /usr/local/src/nagios-plugins-1.4.15[root ~]# tar -axf nagios-plugins-1.4.15.tar.gz -C /usr/local/src/[root ~]# cd -/usr/local/src/nagios-plugins-1.4.15[root nagios-plugins-1.4.15]# ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl=/usr/bin/openssl --enable-perl-modules.............[root nagios-plugins-1.4.15]# make.............[root nagios-plugins-1.4.15]# make install.............make[2]: Leaving directory `/usr/local/src/nagios-plugins-1.4.15'make[1]: Leaving directory `/usr/local/src/nagios-plugins-1.4.15'[root nagios-plugins-1.4.15]