Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Solved: [RHEL 6.2 x64] Issue with Perl SNMP Libs


    Hi all! Having a little bit of an issue getting MRTG to work since moving to RHEL 6.2...

    Just to clear things up in advance, I have net-snmp, net-snmp-devel, net-snmp-libs, net-snmp-perl and net-snmp-utils already installed through yum.

    So, this is what I'm experiencing;

    [root base ~]# cfgmaker <etc...>
    WARNING: SNMP V3 libraries not found, SNMP V3 disabled. Falling back to V2c.
    [root base ~]# perl -e "use Net_SNMP_util;"
    Can't locate Net_SNMP_util.pm in INC (INC contains: /usr/local/lib64/perl5 /us
    r/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /u
    sr/lib64/perl5 /usr/share/perl5 .) at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.

    Okay, so despite my packages being installed it cannot locate my SNMP perl library. Tried locating it and found it in the following directory and tried running cfgmaker from there;

    [root base ~]# find /usr -name Net_SNMP_util.pm
    /usr/lib64/mrtg2/Net_SNMP_util.pm
    [root base ~]# cd /usr/lib64/mrtg2
    [root base mrtg2]# perl -e "use Net_SNMP_util;"
    Can't locate Net/SNMP.pm in INC (INC contains: /usr/local/lib64/perl5 /usr/loc
    al/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/li
    b64/perl5 /usr/share/perl5 .) at Net_SNMP_util.pm line 76.
    BEGIN failed--compilation aborted at Net_SNMP_util.pm line 76.
    Compilation failed in require at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.

    Nope, still doesn't work because SNMP.pm is missing. Found it and created a link.

    [root base mrtg2]# find /usr -name SNMP.pm
    /usr/lib64/perl5/vendor_perl/SNMP.pm
    [root base mrtg2]# cd /usr/lib64/perl5/vendor_perl
    [root base vendor_perl]# mkdir Net
    [root base vendor_perl]# cd Net
    [root base Net]# ln -s ../SNMP.pm SNMP.pm

    ... now to try running cfgmaker again ...

    [root base Net]# cd /usr/lib64/mrtg2
    [root base mrtg2]# perl -e "use Net_SNMP_util;"
    Net::SNMP defines neither package nor VERSION--version check failed at Net_SNMP_
    util.pm line 76.
    BEGIN failed--compilation aborted at Net_SNMP_util.pm line 76.
    Compilation failed in require at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.

    And now I'm pretty much stuck.

    I'm not very familiar with Perl and wasn't able to find out too much about this error. Any assistance would be greatly appreciated.

    I'm tempted at this stage to just grab Net-SNMP from the official website but I try to utilize packages through yum where possible as it simplifies updates in the future.
    Last edited by Entrope; 02-11-2012 at 02:35 AM. Reason: Solved

  2. #2
    Okay, made a little bit of self-progress.

    It seems that net-snmp-perl and perl-Net-SNMP are two completely different things. Go figure. Will do a little bit more testing over the weekend before I go back on my production server and update this thread accordingly if I've either worked it out or bumped into more issues.

    Edit: Yeah that was pretty much the issue (me mixing up net-snmp-perl and perl-Net-SNMP). Have everything mended and working now (:
    Last edited by Entrope; 02-11-2012 at 02:35 AM.

  3. #3
    Quote Originally Posted by Entrope View Post
    Okay, made a little bit of self-progress.

    It seems that net-snmp-perl and perl-Net-SNMP are two completely different things. Go figure. Will do a little bit more testing over the weekend before I go back on my production server and update this thread accordingly if I've either worked it out or bumped into more issues.

    Edit: Yeah that was pretty much the issue (me mixing up net-snmp-perl and perl-Net-SNMP). Have everything mended and working now (:
    Can you explain exactly what you did?
    I made links to Net_SNMP_util.pm and SNMP.pm and now I'm at the point where I see ...

    Net::SNMP defines neither package nor VERSION--version check failed at Net_SNMP_util.pm line 76.

    etc.

    When you say you mixed up those names, what did you mean and how did you fix it?

    thanks
    S

  4. $spacer_open
    $spacer_close
  5. #4
    Quote Originally Posted by spacemancw View Post
    Can you explain exactly what you did?
    I made links to Net_SNMP_util.pm and SNMP.pm and now I'm at the point where I see ...

    Net::SNMP defines neither package nor VERSION--version check failed at Net_SNMP_util.pm line 76.

    etc.

    When you say you mixed up those names, what did you mean and how did you fix it?

    thanks
    S
    you accidenatlly replied to a 6 year old thread.
    i sincerely hope you are not using the same version of RHEL anymore.
    in any case, if you need help, open a new thread with a valid problem description.
    Tapatalk: Kill it with fire!
    How to ask smart questions | Don't be a Help Vampire | How to Use Code Tags
    You can post a link by removing "http://www." from it.

  6. #5
    Quote Originally Posted by nihili View Post
    you accidenatlly replied to a 6 year old thread.
    i sincerely hope you are not using the same version of RHEL anymore.
    in any case, if you need help, open a new thread with a valid problem description.
    I actually replied on purpose. Was hoping the poster would be able to provide his solution. I'm using CentOS 7.

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •