FAQ:Perl 03

From Net-SNMP Wiki
Revision as of 17:58, 28 December 2006 by Dts12 (Talk | contribs) (Move FAQ text to a template page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

But compiling this fails! Why?

The Perl module tends to delve quite deeply into the internals of the main Net-SNMP library, and so is quite sensitive to changes within the library. It's important to use the correct version of the module, that corresponds to the version of the library you have installed. If you're working with a Net-SNMP source distribution, the appropriate versions of the Perl module are shipped as part of this, but you must have run "make install" on the main Net-SNMP distribution first.

If you're working with a ready-installed version of the library, make sure you obtain a compatible version of the Perl module.

Note that the Perl modules will be compiled using the compiler (and compiler settings) used for compiling the original perl binary, not those used for compiling the Net-SNMP (or UCD) library. If these are different (e.g. 'gcc' used for one and 'cc' for the other) then this may well cause problems. It's much safer to use a consistent environment for both. This issue is discussed in greater detail in the README.solaris file.

Also note that the v5 Net-SNMP suite must be configured to provide shared libraries in order for the Perl modules to work correctly. This is not necessary with the v4 UCD-SNMP libraries.

   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?