While trying to use a Nagios plugin I got an error saying that “Can’t locate Sys/Statistics/Linux.pm in @INC”.
Following is complete error:
Can’t locate Sys/Statistics/Linux.pm in @INC (@INC contains: /usr/lib/nagios/plugins /root /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .)
After debugging about error I got to know that there is a perl module in Linux to get system statistics called “libsys-statistics-linux-perl” and which is missing in my machine.
Since I am using Ubuntu, I installed libsys-statistics-linux-perl module with apt-get by using following command:
$ apt-get install libsys-statistics-linux-perl
After installing libsys-statistics-linux-perl module above issue got resolved for me.