<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000099">
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" cols="72">
A. Davis
Email: <a class="moz-txt-link-abbreviated" href="mailto:nccomp@gmail.com">nccomp@gmail.com</a>
"There is no limit to what a man can accomplish
if he doesn't care who gets the credit." - Ronald Reagan
</pre>
<br>
<br>
Martin Fontanez wrote:
<blockquote cite="mid:540556.28569.qm@web59206.mail.re1.yahoo.com"
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 class="moz-txt-link-rfc2396E" href="mailto:jdmfontz@yahoo.com"><jdmfontz@yahoo.com></a><br>
Subject: Can't locate Net/SNMP.pm in @INC When Running check_ifstatus<br>
To: <a class="moz-txt-link-abbreviated" href="mailto: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 wrap="">
<hr size="4" width="90%">
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/businessobjects">http://p.sf.net/sfu/businessobjects</a></pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
</body>
</html>