Getting Error while compiling net-snmp-

Posted on 2008-11-17
Last Modified: 2013-12-21
s/net-snmp- -L/home/downloads/net-snmp- -L/home/downloads/net-snmp- ./.libs/ helpers/.libs/ ./.libs/ /home/downloads/net-snmp- /home/downloads/net-snmp- /home/downloads/net-snmp- /usr/lib/ -L/usr/src/build/757196-i386/install/usr/lib -L/usr/lib /usr/lib/ -L/usr/local/lib -lelf -lselinux /usr/lib/ /usr/lib/ -lrt -lbz2 /usr/lib/ ../snmplib/.libs/ -lcrypto -lz /usr/lib/perl5/5.8.5/i386-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc   -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
make[1]: *** [snmpd] Error 1
make[1]: Leaving directory `/home/downloads/net-snmp-'
make: *** [subdirs] Error 1

I am trying to install netsnmp and integrate it with nagios 3.0 while making the netsnmp plugin im getting the below given error, will be thankful if any body can help out me in it this :)
Question by:Nyjus
    1 Comment
    LVL 10

    Accepted Solution

    It appears your linker can't find (-lelf looking for libelf).  From what I can find on the RPM finder, its part of the systemtap-debuginfo RPM package.  If it isn't included in the distribution disks you have, you can find it on  You can do a search for systemtap-debuginfo and find it.  As an alternative, have you considered pulling down an already packaged version of net-snmp?  Many of the distributions include it in the package files but may not install it by default.  There is a version of the net-snmp package on  A link to a non-denominational version is
    Given this specifies "other" as the Linux edition, YMMV.  There are a number of net-snmp rpm packages that are built specifically for RH, but I was unable to locate one on

    Hope that helps

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
    You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    This video discusses moving either the default database or any database to a new volume.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now