免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7565 | 回复: 9
打印 上一主题 下一主题

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf” [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-10-20 09:56 |只看该作者 |倒序浏览
用tar包安装net-snmp,
./configure --prefix=/usr/local  --with-mib-modules="host disman/event-mib smux misc/ipfwacc ucd-snmp/diskio"
...............................................
/bin/sh ../libtool  --mode=link gcc -I/usr/include/rpm -g -O2 -Dlinux -I/usr/include/rpm  -o snmpd snmpd.lo   libnetsnmpagent.la libnetsnmpmibs.la helpers/libnetsnmphelpers.la  ../snmplib/libnetsnmp.la -ldl -lrpm -lrpmio -lpopt  -lbz2 -lz -lcrypto -lm   
gcc -I/usr/include/rpm -g -O2 -Dlinux -I/usr/include/rpm -o .libs/snmpd snmpd.o  ./.libs/libnetsnmpagent.so ./.libs/libnetsnmpmibs.so helpers/.libs/libnetsnmphelpers.so ../snmplib/.libs/libnetsnmp.so -ldl /usr/lib/librpm.so /usr/lib/librpmdb.so -L/usr/src/build/229501-i386/BUILD/rpm-4.2/zlib -L/usr/local/lib -lelf /usr/lib/librpmio.so -lrt -lpthread /usr/lib/libpopt.so -lbz2 -lz -lcrypto -lm  -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/dong/newinstall/install_nagios_by_oreon-v0.3/net-snmp-5.1.1/agent'
make: *** [subdirs] Error 1

这个错误是什么意思?是不是缺少其他软件?

论坛徽章:
0
2 [报告]
发表于 2005-10-20 10:19 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

没人看,自己顶。

论坛徽章:
0
3 [报告]
发表于 2005-10-20 14:14 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

On RedHat 8.0 or up I get "/usr/bin/ld: cannot find -lelf"?
----------------------------------------------------------

  A typical installation of RedHat 8.0 and up doesn't always include
  the full set of 'libelf' library links.  In order to build Net-SNMP
  you may need to install the 'elfutils-devel' RPM.

  A alternative quick fix is to add the missing symbolic link, using:

    ln -s libelf.so.1 /usr/lib/libelf.so

  (or whatever the correct library is on your system).
  This is typically only needed when you've configured the agent to
  include the Host Resources MIB support ('--with-mib-modules=host').

论坛徽章:
0
4 [报告]
发表于 2005-10-20 15:50 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

Thx a lot .This is the very problem I met.would you please show me the way you found this message?

论坛徽章:
0
5 [报告]
发表于 2005-10-20 15:59 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

[quote]原帖由 "digex"]Thx a lot .This is the very problem I met.would you please show me the way you found this message?[/quote 发表:


google  net-snmp "/usr/bin/ld: cannot find -lelf"

the 5th result

http://net-snmp.sourceforge.net/docs/FAQ.html

论坛徽章:
0
6 [报告]
发表于 2005-10-20 16:06 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

个人认为是系统编译时没有找到你写的一些环境值。
./configure --prefix=/usr/local  --with-mib-modules="host disman/event-mib smux misc/ipfwacc ucd-snmp/diskio"
只用./configure 看看。

论坛徽章:
0
7 [报告]
发表于 2005-10-20 16:16 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

to me09:只用./configure是没有问题的,但是没有mib库缺少了host,而这正是所需要

论坛徽章:
0
8 [报告]
发表于 2005-10-20 16:19 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

thx wolfg.Now I learn one more tip in google using.The "" to match the very string.

论坛徽章:
0
9 [报告]
发表于 2005-10-21 09:30 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

# RedHat9.0:
rpm -ivh elfutils-devel-0.76-3.i386.rpm
rpm -ivh bzip2-devel-1.0.2-8.i386.rpm

# RedHatAS3.x:
rpm -ivh beecrypt-devel-3.0.1-0.20030630.i386.rpm

如果还缺啥包,在光盘里找就是了

论坛徽章:
0
10 [报告]
发表于 2005-10-23 11:26 |只看该作者

安装net-snmp的一个错误“/usr/bin/ld:cannot find -lelf”

thx FunBSD
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP