Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am currently trying to compile net-snmp-5.7.2 on rhel 6 64bit system.

./configure step is fine, but when I do the make step I got the following error :

gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   agent.o  -o ../blib/arch/auto/NetSNMP/agent/agent.so  \
           -L/applis/src/compilation/net-snmp-5.7.2/perl/agent/../../snmplib/.libs -L/applis/src/compilation/net-snmp-5.7.2/perl/age nt/../../snmplib -L/applis/src/compilation/net-snmp-5.7.2/perl/agent/../../agent -lnetsnmpmibs -lnetsnmpagent -lnetsnmp         \

/usr/bin/ld: cannot find -lnetsnmpmibs

I'm a bit lost here, as I though that those libs should be provided by the net-snmp-5.7.2.

Can anyone give me some tips ?



share|improve this question
Isn't this available in the official repositories? Don't worry if the version looks old and candidate for the CVE winner of all time, Red Hat does keep up with security (and other) fixes backporting stuff so the base version doesn't need to be changed. A rpm -q --changelog <package> should make this clear. –  vonbrand Mar 25 '13 at 11:02
add comment

2 Answers

You don't have the libnetsnmpibs library,

See the output from ld: /usr/bin/ld: cannot find -lnetsnmpmibs

share|improve this answer
add comment

You are missing prerequisites for the build. Go over the INSTALL or README file listing dependencies, and install all of them. You'll probably need the -devel packages of any libraries mentioned; the plain packages just contain what is needed to use them, not to build programs using them.

share|improve this answer
Hello, I was missing net-snmp-devel.x86_64 package, but this doesn't explain how I could build this depencies my self. My aim is to not be depandent from the rpm packages. –  Hugo Mar 25 '13 at 12:57
@Hugo, what are you doing on RHEL then? It's biggest advantage is precisely that they handle the tracking upstream, integrating, troubleshooting, and packaging for you, and offer a solid, tested system. If you really want to go that route, learn how to build RPMs, check out the source RPMs for the relevant packages and adjust them for your versions. –  vonbrand Mar 26 at 9:37
I don't use rpm as I need to build software in order to use them in a chroot. –  Hugo Mar 27 at 10:24
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.