Can't locate Net/SNMP.pm in @INC

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bhaskarbabar
Posts: 19
Joined: Tue Jun 05, 2018 6:48 am

Can't locate Net/SNMP.pm in @INC

Post by bhaskarbabar »

Problem 2
./check_cisco_switch.pl -H **.**.**.** -C ******* -t fan
Can't locate Net/SNMP.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 ./check_cisco_switch.pl line 15.
BEGIN failed--compilation aborted at ./check_cisco_switch.pl line 15.

I am receiving this error when i fire this command "./check_cisco_switch.pl -H **.**.**.** -C ******* -t fan"
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Can't locate Net/SNMP.pm in @INC

Post by lmiltchev »

Try installing the perl-Net-SNMP package.

On CentOS:

Code: Select all

yum install perl-Net-SNMP -y
Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
bhaskarbabar
Posts: 19
Joined: Tue Jun 05, 2018 6:48 am

Re: Can't locate Net/SNMP.pm in @INC

Post by bhaskarbabar »

After exicuting given command get below message

yum install perl-Net-SNMP

Loaded plugins: refresh-packagekit, security
Setting up Install Process
Ol6_latest | 3.0 kB 00:00
kernel_upgrade | 2.5 kB 00:00
ksplice-uptrack | 2.5 kB 00:00
No package perl-Net-SNMP available.
Error: Nothing to do
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Can't locate Net/SNMP.pm in @INC

Post by lmiltchev »

The package is provided by the epel repo. You probably don't have it, so try:

Code: Select all

yum install epel-release -y
yum update -y
yum install perl-Net-SNMP -y
Be sure to check out our Knowledgebase for helpful articles and solutions!
bhaskarbabar
Posts: 19
Joined: Tue Jun 05, 2018 6:48 am

Re: Can't locate Net/SNMP.pm in @INC

Post by bhaskarbabar »

Thanks for info.

But perl-Net-SNMP was already installed.

After Rebooting server it worked.

Thanks for your reply.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Can't locate Net/SNMP.pm in @INC

Post by lmiltchev »

I am glad your issue has been resolved! I am closing this topic. If you have any further questions, please start a new thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked