Getting Error while compiling net-snmp-5.4.2.1

s/net-snmp-5.4.2.1/snmplib/.libs -L/home/downloads/net-snmp-5.4.2.1/snmplib -L/home/downloads/net-snmp-5.4.2.1/agent/helpers ./.libs/libnetsnmpagent.so helpers/.libs/libnetsnmphelpers.so ./.libs/libnetsnmpmibs.so /home/downloads/net-snmp-5.4.2.1/agent/helpers/.libs/libnetsnmphelpers.so /home/downloads/net-snmp-5.4.2.1/agent/.libs/libnetsnmpagent.so /home/downloads/net-snmp-5.4.2.1/snmplib/.libs/libnetsnmp.so /usr/lib/librpm.so -L/usr/src/build/757196-i386/install/usr/lib -L/usr/lib /usr/lib/librpmdb.so -L/usr/local/lib -lelf -lselinux /usr/lib/librpmio.so /usr/lib/libbeecrypt.so -lrt -lbz2 /usr/lib/libpopt.so ../snmplib/.libs/libnetsnmp.so -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-5.4.2.1/agent'
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 :)
NyjusAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gt2847cSr. Security ConsultantCommented:
It appears your linker can't find libelf.so (-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 rpm.pbone.net.  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 5.4.2.1 net-snmp package on rpm.pbone.net.  A link to a non-denominational version is http://rpm.pbone.net/index.php3/stat/4/idpl/10019917/com/net-snmp-5.4.2.1-1.f9.i386.rpm.html
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 5.4.2.1...

Hope that helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.