RE: perhaps you forgot to load "SNMP::Session"?

"Mike Ayers" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <83E753BE7B6A324ABB336245BAF1DAAC07A6CC92@mailserver.metatv-ds.metatv.com>
> From: [email protected] 
> [mailto:[email protected]] On 
> Behalf Of Alex Moen
> Sent: Thursday, December 27, 2007 1:55 PM

> I am using the "mon" monitoring program, and one of the 
> monitors requires the use of the Net::SNMP module.  I have 
> installed the module as many 
> different ways that I can, ending with refreshing the 
> original RPMs from the distribution.  However, the software 
> still gives me the same error:
> 
> Can't locate object method "new" via package "SNMP::Session" 
> (perhaps you forgot to load "SNMP::Session"?) at 
> ./snmp_interface.monitor line 93.
> 
> Other solutions have suggested that I run perl -MSNMP, but 
> that is giving a strange output, being blank:
> 
> /usr/bin/perl -MSNMP -e 'print $SNMP::VERSION, "\n"'
> 
> not unfound, just blank; whereas other modules give me an answer:

	I don't have an answer, so I'll just blantantly plagiarize Dave Shield:

> There are basically two alternative SNMP perl modules.
> One is a "pure-perl" implementation, called "Net::SNMP"
> and develeped by David Town.
> The other is a perl interface to the Net-SNMP C libraries,
> which comes as two separate packages - SNMP and Net-SNMP.
> These are therefore closely linked with the C library code.
> 
> The SNMP::Info module is a higher-level convenience module,
> using the Net-SNMP perl modules (i.e. SNMP/Net-SNMP).
> 
> 
> The SNMP::Info documentation tells you not to install SNMP or
> Net::SNMP from CPAN - but the reasons are different for each of
> these two packages.
> 
>    You shouldn't install Net::SNMP because the SNMP::Info
> module is not written to use the Net::SNMP api.   It's the wrong
> package for this module, so there's no point in installing it.
> 
>   You *should* install SNMP/Net-SNMP - but not from CPAN.
> Because these modules are closely linked with the C library,
> they rely on having the correct version of the library installed.
> There can be minor changes to the library internals from one
> release to another, which wouldn't affect most applications
> but can break the perl internals.
> 
>   The safest approach is to install the SNMP perl modules from
> the same Net-SNMP distribution as the C libraries that you are
> using.   That's the most reliable way to ensure compatibility.
> 
> If you are using a vendor-supplied version of the Net-SNMP suite,
> then they ought to provide a package that includes the perl APIs
> as well.   If you compiled things yourself from source, then
> 
>    ./configure --with-perl-modules
> 
> will build the correct perl API modules as well.
> 
> 
> I trust that makes things a bit clearer.

	HTH,

Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.