[root@localhost libexec]# ./check_cisco_fru_module.pl -h
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at ./check_cisco_fru_module.pl line 30.
BEGIN failed--compilation aborted at ./check_cisco_fru_module.pl line 30.
in line 30 as below
26 use strict;
27
28 use lib "/usr/local/nagios/libexec";
29
30 use Nagios::Plugin;
31 use Net::SNMP;
Can't locate Nagios/Plugin.pm in @INC
Can't locate Nagios/Plugin.pm in @INC
Zajil NMS
Re: Can't locate Nagios/Plugin.pm in @INC
[root@localhost libexec]# ./check_cisco_fru_ps.pl -V
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 299.
Bareword "OK" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 312.
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 316.
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 134.
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 140.
Execution of ./check_cisco_fru_ps.pl aborted due to compilation errors.
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 299.
Bareword "OK" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 312.
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 316.
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 134.
Bareword "UNKNOWN" not allowed while "strict subs" in use at ./check_cisco_fru_ps.pl line 140.
Execution of ./check_cisco_fru_ps.pl aborted due to compilation errors.
Zajil NMS
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't locate Nagios/Plugin.pm in @INC
You should be able to run the following to install the missing packagezaji_nms wrote:Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/nagios/libexec /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at ./check_cisco_fru_module.pl line 30.
Code: Select all
yum install perl-Nagios-Plugin -yRe: Can't locate Nagios/Plugin.pm in @INC
zaji_nms,
In general when you get an alert like this in perl:
you can run this:
and it will install the pre-requisite.
In general when you get an alert like this in perl:
Code: Select all
Can't locate Something/Other.pmCode: Select all
yum install perl-Something-Other -y