<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Davis,<br><br>Thank you for taking the time to reply with such detail and precision.  This worked well and and fixed the error.   <br><br>One thing with CPAN is that for some reason when I am in cpan prompt, whatever I type does not get displayed.<br><br>Regards,<br><br>Martin  <br><br>--- On <b>Mon, 5/18/09, Andrew Davis <i><nccomp@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Andrew Davis <nccomp@gmail.com><br>Subject: Re: [Nagios-users] Can't locate Net/SNMP.pm in @INC When Running check_ifstatus<br>To: Nagios-users@lists.sourceforge.net<br>Date: Monday, May 18, 2009, 4:14 PM<br><br><div id="yiv1964920443">


  
As root, try "perl -MCPAN -e shell" then "install Net::SNMP". You may
want to first do "install Bundle::CPAN", then "install Net::SNMP". Also
open up the test script (assuming its not a compiled binary) and check
for all the "use" lines and make sure they're installed. For example,
from another script I saw:<br>
<br>
use strict;<br>
use Net::SNMP;<br>
use Getopt::Long;<br>
<br>
So my steps were:<br>
<blockquote>>sudo su -<br>
perl -MCPAN -e shell<br>
install Bundle::CPAN<br>
reload cpan<br>
reload index<br>
install Net::SNMP<br>
install Getopt::Long<br>
</blockquote>
For each, I installed prereq's where prompted...<br>
<br>
Also, depending on your OS, you may want to update the OS first before
doing the above. For example, with CentOS, an "yum -y update" is good
practice every now and then... keeps you nice and current. But keep in
mind that anything built against a specific package may fail (last time
I did this, Cacti choked as it was built against a specific version of
a library and needed to be recompiled).<br>
<br>
Other common perl modules to consider include DBI, DBD::mysql, etc...<br>
<br>
Oh, and put the Net::SNMP line that you changed back... unfortunately,
the output of your RPM query is showing the SNMP programs themselves.
The script you're using is looking for the Perl module Net::SNMP.
net-snmp and Net::SNMP are two completely different things, yet often
times codependent.<br>
<br>
Hope this helps...<br>
<pre class="moz-signature">  A. Davis<br>  Email:     <a rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:nccomp@gmail.com" target="_blank" href="/mc/compose?to=nccomp@gmail.com">nccomp@gmail.com</a><br><br>  "There is no limit to what a man can accomplish<br>   if he doesn't care who gets the credit." - Ronald Reagan<br></pre>
<br>
<br>
Martin Fontanez wrote:
<blockquote type="cite">
  <table border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
        <blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;">From:
Martin Fontanez <a rel="nofollow" class="moz-txt-link-rfc2396E" ymailto="mailto:jdmfontz@yahoo.com" target="_blank" href="/mc/compose?to=jdmfontz@yahoo.com"><jdmfontz@yahoo.com></a><br>
Subject: Can't locate Net/SNMP.pm in @INC When Running check_ifstatus<br>
To: <a rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:Nagios-users@lists.sourceforge.net" target="_blank" href="/mc/compose?to=Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
Date: Monday, May 18, 2009, 3:46 PM<br>
          <br>
          <div id="yiv82798553">
          <table border="0" cellpadding="0" cellspacing="0">
            <tbody>
              <tr>
                <td valign="top">
                <div>I am getting this error and not certain what
gives.  Tried various solutions including creating a link to ../net dir
but still get errors.  I did yum installs of relevant *snmp* packages. 
Is there a standard fix for this error?</div>
                <div> </div>
                <div>1 - [root@localhost libexec]# ./check_ifstatus -H
localhost<br>
Can't locate Net/SNMP.pm in @INC (@INC contains:
/usr/local/nagios/libexec
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at ./check_ifstatus line 39.<br>
BEGIN failed--compilation aborted at ./check_ifstatus line 39.<br>
                </div>
                <div>2 - SNMP.pm is (not on @INC path, but created a
link to ...Net/) on the following location: </div>
                <div>[root@localhost libexec]# find / -name SNMP.pm<br>
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/SNMP.pm<br>
[root@localhost libexec]#</div>
                <div> </div>
                <div>3 - Looks like I got relevant rpm installed:</div>
                <div>[root@localhost libexec]# rpm -qa | grep -i snmp<br>
net-snmp-libs-5.3.2.2-5.el5<br>
net-snmp-perl-5.3.2.2-5.el5<br>
net-snmp-5.3.2.2-5.el5<br>
[root@localhost libexec]#<br>
                </div>
                <div>4.  Edited the file ../check_ifconfig  and
replaced "use Net::SNMP;" with use "SNMP;" but that created other
errors.</div>
                <div> </div>
                <div> </div>
                <div> </div>
                <div> </div>
                </td>
              </tr>
            </tbody>
          </table>
          <br>
          </div>
        </blockquote>
        </td>
      </tr>
    </tbody>
  </table>
  <br>
  <pre><hr size="4" width="90%"><br>------------------------------------------------------------------------------<br>Crystal Reports - New Free Runtime and 30 Day Trial<br>Check out the new simplified licensing option that enables <br>unlimited royalty-free distribution of the report engine <br>for externally facing server and web deployment. <br><a rel="nofollow" class="moz-txt-link-freetext" target="_blank" href="http://p.sf.net/sfu/businessobjects">http://p.sf.net/sfu/businessobjects</a></pre>
  <pre><hr size="4" width="90%"><br>_______________________________________________<br>Nagios-users mailing list<br><a rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:Nagios-users@lists.sourceforge.net" target="_blank" href="/mc/compose?to=Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a rel="nofollow" class="moz-txt-link-freetext" target="_blank" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
 
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">------------------------------------------------------------------------------<br>Crystal Reports - New Free Runtime and 30 Day Trial<br>Check out the new simplified licensing option that enables <br>unlimited royalty-free distribution of the report engine <br>for externally facing server and web deployment. <br><a href="http://p.sf.net/sfu/businessobjects" target="_blank">http://p.sf.net/sfu/businessobjects</a></div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Nagios-users mailing list<br><a ymailto="mailto:Nagios-users@lists.sourceforge.net" href="/mc/compose?to=Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include
 Nagios version, plugin version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null</div></blockquote></td></tr></table><br>