Difference between revisions of "FAQ:Perl 02"

From Net-SNMP Wiki
Jump to: navigation, search
 
(Move FAQ text to a template page)
 
Line 1: Line 1:
 
= How do I install the Perl SNMP modules? =  
 
= How do I install the Perl SNMP modules? =  
  
Assuming you have a reasonably new (and properly configured) perl system,
+
{{FAQ:Perl_02}}
this should be simply:
+
 
+
      cd perl          (for 5.0.x)
+
or
+
      cd perl/SNMP      (for 4.2.x)
+
 
+
      perl Makefile.PL
+
        (press RETURN when prompted for host and community)
+
      make
+
      make test
+
      make install  (probably as root)
+
 
+
Note that with the 5.0 release line, there are additional SNMP-related
+
perl modules that should probably be installed as well.  These can also
+
be found under the <CODE>'perl'</CODE> subdirectory.
+
At the very least, install the <CODE>'default_store'</CODE> module.
+
This is not necessary with the 4.2.x releases.
+
  
 
     [[FAQ:Perl]]
 
     [[FAQ:Perl]]
 
     {{FAQ:Perl}}
 
     {{FAQ:Perl}}

Latest revision as of 17:55, 28 December 2006

How do I install the Perl SNMP modules?

Assuming you have a reasonably new (and properly configured) Perl system, this should be simply:

     cd perl
     perl Makefile.PL
       (press RETURN when prompted for host and community)
     make
     make test
     make install  (probably as root)

It might be possible to install the basic module using

       perl -MCPAN -e shell ; "install SNMP"

but this has not been reliably tested, and very much relies on having the correct version of the Net-SNMP library.

There may also be appropriate pre-compiled versions of the Perl modules available from the Net-SNMP project website, or your O/S vendor.

   FAQ:Perl
   
  1. What is the purpose of the Perl SNMP module?
  2. Where can I get the Perl SNMP package?
  3. How do I install the Perl SNMP modules?
  4. But compiling this fails! Why?
  5. Compiling the Perl module works OK, but 'make test' fails. Why?
  6. Why can't mib2c (or tkmib) locate SNMP.pm?
  7. Why can't mib2c (or tkmib) load SNMP.so?
  8. Why can't tkmib locate Tk.pm?
  9. Why does your RPM complain about missing Perl modules?
  10. I've got a problem with the Net-SNMP module. Can you help?