I'm trying to install the perl module packaged with net-snmp ver. 5.3.1, the latest stable version. I downloaded from http://net-snmp.sourceforge.net/download.html, and the application itself installs OK, i.e. the commands
cd net-snmp-5.3.1 ./configure --with-perl-modules --enable-shared make make test make install
run fine, with no errors. However, when I cd to the included perl directory (i.e. that comes with the download) and try to do
/usr/bin/perl Makefile.PL make make test
I get the following errors:
PERL_DL_NONLAZY=1 /usr/bin/perl "-I../blib/lib" "-I../blib/arch" test. +pl 1..64 Can't load '../blib/arch/auto/NetSNMP/default_store/default_store.so' +for module NetSNMP::default_store: libnetsnmp.so.10: cannot open shar +ed object file: No such file or directory at /usr/lib/perl5/5.8.5/i38 +6-linux-thread-multi/DynaLoader.pm line 230. at test.pl line 71 Compilation failed in require at test.pl line 71. BEGIN failed--compilation aborted at test.pl line 71. not ok 1 make[1]: *** [test_dynamic] Error 255 make[1]: Leaving directory `/root/netdisco/net-snmp-5.3.1/perl/default +_store' make: *** [test] Error 2
This is even though the default_store.so file is there:
[root@burvil default_store]# ls -l ../blib/arch/auto/NetSNMP/default_s +tore/default_store.so -rwxr-xr-x 1 root root 85559 Sep 14 13:54 ../blib/arch/auto/NetSNMP/d +efault_store/default_store.so You have new mail in /var/spool/mail/root [root@burvil default_store]# pwd /root/netdisco/net-snmp-5.3.1/perl/default_store
as is the libnetsnmp.so.10 file:
[root@burvil perl]# ls -l /usr/local/lib/libnetsnmp.so.10 lrwxrwxrwx 1 root root 20 Sep 13 20:06 /usr/local/lib/libnetsnmp.so.1 +0 -> libnetsnmp.so.10.0.1 [root@burvil perl]# ls -l /usr/local/lib/libnetsnmp.so.10.0.1 -rwxr-xr-x 1 root root 1237224 Sep 13 20:06 /usr/local/lib/libnetsnmp +.so.10.0.1
and the Makefile that's created with perl Makefile.PL has the settings to look in that directory:
LD = gcc LDDLFLAGS = -shared -L/usr/local/lib LDFLAGS = -L/usr/local/lib
I tried installing anyway, ignoring the errors, and the same errors come up when I use it. Also, I need to this particular SNMP module (I know there are others, like SNMP_session), but the perl app I'm installing (netdisco) specifically requires this one. Also, I get the same message when installing a previous version, net-snmp 5.1.4. I'm running perl 5.8.5, gcc 3.4.5 (see below), and RHEL AS 4 Update 3.

[root@burvil perl]# gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.5/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- +infodir=/usr/share/info --enable-shared --enable-threads=posix --disa +ble-checking --with-system-zlib --enable-__cxa_atexit --disable-libun +wind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux Thread model: posix gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
Solution: Well, I realized what was wrong. I had installed net-snmp from source on my RHEL AS 4 box, even though it was already installed from rpm. The version from rpm was older. I thought it wouldn't matter, since I specified different directories, but I guess not. I ended up installing netdisco on another system, where I hadn't installed from source, and thus not corrupted the libraries.

-- Burvil


In reply to Net::SNMP module make test failing by bowei_99

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.