Results 1 to 2 of 2
Hey guys, hoping you can help me out with a recent problem.
This morning I set about installing Cacti, haven't had much success and it appears that the problem is ...
- 01-08-2009 #1Just Joined!
- Join Date
- Jan 2009
- Posts
- 1
Unable to compile SNMP in PHP5.2.8
Hey guys, hoping you can help me out with a recent problem.
This morning I set about installing Cacti, haven't had much success and it appears that the problem is likely that SNMP is not compiled in PHP. (I do have snmp & snmpd installed via the apt-get system.)
So, I set about recompiling PHP with the "--with-snmp" flag, but I get the following error:
The config.log shows the followingCode:checking for SNMP support... yes checking OpenSSL dir for SNMP... no checking whether to enable UCD SNMP hack... no checking for net-snmp-config... /usr/bin/net-snmp-config checking for snmp_parse_oid in -lnetsnmp... no checking for init_snmp in -lnetsnmp... no configure: error: SNMP sanity check failed. Please check config.log for more information.
Which isn't telling me much more, basically looks like the problem is with /usr/bin/ld: cannot find -lnetsnmp...but I have no idea how to proceed from here.Code:configure:87422: checking for SNMP support configure:87469: checking OpenSSL dir for SNMP configure:87495: checking whether to enable UCD SNMP hack configure:87523: checking for net-snmp-config configure:88779: checking for snmp_parse_oid in -lnetsnmp configure:88798: gcc -o conftest -I/usr/local/include -g -O2 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c -lnetsnmp -lrt -lmysqlclient -lmhash -lmcrypt -lltdl -liconv -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -liconv -lm -lssl -lcrypto -lcurl -lxml2 -lz -liconv -lm -lssl -lcrypto -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc -lxml2 -lz -liconv -lm -lnetsnmp 1>&5 /usr/bin/ld: cannot find -lnetsnmp collect2: ld returned 1 exit status configure: failed program was: #line 88787 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char snmp_parse_oid(); int main() { snmp_parse_oid() ; return 0; } configure:88932: checking for init_snmp in -lnetsnmp configure:88951: gcc -o conftest -I/usr/local/include -g -O2 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c -lnetsnmp -lrt -lmysqlclient -lmhash -lmcrypt -lltdl -liconv -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -liconv -lm -lssl -lcrypto -lcurl -lxml2 -lz -liconv -lm -lssl -lcrypto -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc -lxml2 -lz -liconv -lm -lnetsnmp 1>&5 /usr/bin/ld: cannot find -lnetsnmp collect2: ld returned 1 exit status configure: failed program was: #line 88940 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char init_snmp(); int main() { init_snmp() ; return 0; }
Thanks for the help!
- 01-14-2009 #2OS's I use: Debian testing, Debian stable, Ubuntu, Windows XP, Windows Vista


Reply With Quote

