Net::SNMP problem

Issues related to applications and software problems
Post Reply
dlhjake
Posts: 2
Joined: 2015/01/16 01:07:47
Location: Auburn, NY

Net::SNMP problem

Post by dlhjake » 2015/01/16 01:16:19

Running CentOS 7 [CentOS Linux release 7.0.1406 (Core)], trying to run perl scripts, which cannot find Net::SNMP (perl 5, version 16, subversion 3 (v5.16.3).)

Code: Select all

[root@server ~]# perl -e "use Net::SNMP"
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 -e line 1.
BEGIN failed--compilation aborted at -e line 1.
[root@server ~]# 
So install it, right? It already is:

Code: Select all

[root@server ~]# yum install net-snmp-perl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.evolvedservers.com
 * extras: bay.uchicago.edu
 * updates: mirror.anl.gov
Package 1:net-snmp-perl-5.7.2-18.el7.x86_64 already installed and latest version
Nothing to do
[root@server ~]#
I've googled anything and everything I can think of, and just cannot figure out what I need to do ...

User avatar
TrevorH
Forum Moderator
Posts: 23468
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Net::SNMP problem

Post by TrevorH » 2015/01/16 02:33:34

To find out, ask yum: yum provides '*/Net/SNMP.pm'

You'll need EPEL installed so if it isn't already, then yum install epel-release
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

dlhjake
Posts: 2
Joined: 2015/01/16 01:07:47
Location: Auburn, NY

Re: Net::SNMP problem

Post by dlhjake » 2015/01/16 14:27:30

Thank you! I was missing epel-release. Once I installed that, I was able to find and install perl-Net-SNMP, which is what provides Net::SNMP ...

Post Reply