Page 1 of 1

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

Posted: Mon Sep 10, 2018 8:39 am
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"

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

Posted: Mon Sep 10, 2018 11:53 am
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.

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

Posted: Tue Sep 11, 2018 5:24 am
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

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

Posted: Tue Sep 11, 2018 10:34 am
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

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

Posted: Wed Sep 12, 2018 5:17 am
by bhaskarbabar
Thanks for info.

But perl-Net-SNMP was already installed.

After Rebooting server it worked.

Thanks for your reply.

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

Posted: Wed Sep 12, 2018 9:52 am
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.