Home > Linux > Can’t locate Sys/Statistics/Linux.pm

Can’t locate Sys/Statistics/Linux.pm

August 5th, 2016 Leave a comment Go to comments

When using check_stats.pl on Centos 7 I got a known error but not so easy to fix…

PROBLEM:
# su – nrpe -c “/usr/lib64/nagios/plugins/check_stats.pl -C -w 90% -c 95%”
Can’t locate Sys/Statistics/Linux.pm in @INC (@INC contains: /usr/lib64/nagios/plugins /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 /usr/lib64/nagios/plugins/check_stats.pl line 33.
BEGIN failed–compilation aborted at /usr/lib64/nagios/plugins/check_stats.pl line 33.

SOLUTION:
cp -rfv /root/perl5/lib/perl5/ /usr/lib64/perl5/

change check_stats.pl
use lib “/usr/lib64/perl5/perl5/”;

DETAILS:
run a perl -V with both users and you will noticie the diference
not sure why but some modules got installed inside /root/perl5/lib

good ref:
http://www.cpan.org/modules/INSTALL.html

Categories: Linux Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

VAMOVE *

*