PDA

View Full Version : NET-SNMP compile error on RHEL4 U4 x86_64


vrtareg
20-08-2007, 08:54
Hi

I try to compile zabbix on 64bit RHEL4 U4 system but get a NET-SNMP error:

--------------------
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.13.1
checking for libcurl >= version 7.13.1... yes
checking for main in -lcurl... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
checking for net-snmp-config... /usr/bin/net-snmp-config
checking for main in -lnetsnmp ... no
configure: error: Not found NET-SNMP library
--------------------

Who notice this error?

I try to compile version 1.4.2 latest sources, 1.4.1 release compiles normally with the same packages of curl and net-snmp.


Thanks
Areg

swaterhouse
20-08-2007, 14:25
try:

yum install net-snmp net-snmp-libs net-snmp-utils net-snmp-devel

vrtareg
20-08-2007, 14:33
Hi

All snmp packages are installed.

---------------------
[#]rpm -qa | grep snmp
net-snmp-devel-5.1.2-11.EL4.7
net-snmp-libs-5.1.2-11.EL4.7
net-snmp-5.1.2-11.EL4.7
net-snmp-perl-5.1.2-11.EL4.7
php-snmp-5.2.1-5
net-snmp-utils-5.1.2-11.EL4.7
---------------------

I forget to write version of zabbix.
I normally compile zabbix 1.4.1 and dont receive errors for snmp. Now i try to compile latest sources for version 1.4.2 and configure returns this error.
It seems that there are some errors in configure script.

Areg

RohrbaGe
23-08-2007, 20:58
I have the same problem on a Suse 10.1 machine.

1.4.1 compiles fine
1.4.2 failed, the error comes during configure.

checking for main in -lnetsnmp ...no
error: Not found NET-SNMP library

I remember a similiar problem with 1.4 or 1.4.1,
but I do not remember the solution

Look at that, maybe someone can tell me exactly what to do, and where to edtit
http://www.zabbix.com/forum/showthread.php?t=6289&highlight=NET-SNMP

Gerald

vrtareg
24-08-2007, 07:13
I found the solution.

I add -lcurl in configure script at line 10534 like this:


-LIBS="-lnetsnmp $LIBS"
+LIBS="-lnetsnmp -lcurl $LIBS"


This is only for version 1.4.2.

Areg

RohrbaGe
24-08-2007, 17:56
Thanks Areg,

that has worked also on Suse 10.1 with the change.

Great

Gerald

bee
25-08-2007, 14:18
Hi Areg,
Thanks, your post make it work on FreeBSD 4.11 as well

Thanks,
BEE

Jun.Liu
28-08-2007, 07:37
I modified the configure script but the error still there:(
my environment:
Zabbix 1.4.2
FC4

log:
# rpm -qa |grep snmp
net-snmp-libs-5.2.1-12
net-snmp-5.2.1-12

#./configure --enable-server --with-sqlite3 --with-net-snmp -with-libcurl
...
...
checking for net-snmp-config...
configure: error: Invalid NET-SNMP directory - unable to find net-snmp-config



what can I do? thanks in advance!

Alexei
28-08-2007, 08:48
what can I do? thanks in advance!
Install net-snmp-devel.

Jun.Liu
28-08-2007, 12:26
Install net-snmp-devel.

hi, Alexei
Thanks your reply. I found the net-snmp-devel and installed it, but it said it need the beecrypt-devel & elfutils-devel pkgs installed beforehand, then I found and installed the two pkg, the elfutils-devel pkg said again the elfutils-libelf was needed, and then the elfutils.... I was crazy on these.. where is the end ? can you tell me any other way to implement net-snmp installation?

Alexei
01-09-2007, 16:49
where is the end ?
Well, I don't know. Ubuntu, Debian?

swaterhouse
04-09-2007, 15:03
if you do a yum install (or up2date) of net-snmp-devel it should install all the dependencies with it.

yum install net-snmp-devel

primos
11-09-2007, 11:46
Hy,

I have the same error on all versions after 1.4.x, but for 1.5 seems that changing the line in configure script helps.
I run novell SLES 9.

SharkCZ
11-09-2007, 11:53
I have the same problem with Fedora build system. i386 and ppc variants are OK, only x86_64 is failing.

Can you post the relevant output from config.log?

primos
14-09-2007, 12:54
LIBS="-lnetsnmp -lssl $LIBS"

missing ssl is the real issue here.

for my SLES 9

SharkCZ
15-09-2007, 14:13
For some unknown reason the configure doesn't link with libcrypto when testing libnetsnmp. The attached patch fixes the issue.
For RHEL or CentOS you can use zabbix packages from EPEL (http://fedoraproject.org/wiki/EPEL)

psedo
19-09-2007, 09:16
Thanks for your patch, it worked fine in my case !