Error for compiling Nagios-Plugins On CentOS

###Environment:

  • System:CentOS release 6.3 (Final)
  • SoftWare:Nagios-Plugins-1.4.14

###Problem Description:

1
2
3
4
5
6
7
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 2
make[2]: Leaving directory `/usr/local/package/nagios-plugins-1.4.14/perlmods'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/package/nagios-plugins-1.4.14'
make: *** [all] Error 2

###Solution:

The packageExtUtils-MakeMakerhas to be installed first. Additionally, perl-devel is also needed to compile it. Then, reconfigure nagios-plugins.

1
2
3
4
5
6
7
8
yum install perl
yum install perl-devel
wget http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-6.64.tar.gz
tar -zxvf ExtUtils-MakeMaker-6.64.tar.gz
cd ExtUtils-MakeMaker-6.64
perl Makefile.PL
make
make install

Then,we can continue the nagios-plugin installling.