免费注册 查看新帖 |

Chinaunix

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

****** 请教 redhat9 中 net-snmp 的安装问题 ****** [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-26 20:15 |只看该作者 |倒序浏览
请教各位:

在redhat9中,安装net-snmp-5.2.2.tar.gz时,编译出现如下错误:


n file included from if-mib/data_access/interface_linux.c:27:

/usr/include/pci/pci.h:29: parse error before "byte"

/usr/include/pci/pci.h:30: parse error before "u8"

/usr/include/pci/pci.h:31: parse error before "word"

/usr/include/pci/pci.h:32: parse error before "u16"

/usr/include/pci/pci.h:33: parse error before "u32"

/usr/include/pci/pci.h:122: parse error before "word"

/usr/include/pci/pci.h:127: parse error before "vendor_id"

/usr/include/pci/pci.h:135: `access' redeclared as different kind of symbol

/usr/include/unistd.h:260: previous declaration of `access'

/usr/include/pci/pci.h:137: parse error before '*' token

/usr/include/pci/pci.h:141: parse error before '}' token

/usr/include/pci/pci.h:146: parse error before "pci_read_byte"

/usr/include/pci/pci.h:147: parse error before "pci_read_word"

/usr/include/pci/pci.h:148: parse error before "pci_read_long"

/usr/include/pci/pci.h:149: parse error before "byte"

/usr/include/pci/pci.h:150: parse error before "byte"

/usr/include/pci/pci.h:151: parse error before "word"

/usr/include/pci/pci.h:152: parse error before "u32"

/usr/include/pci/pci.h:153: parse error before "byte"

/usr/include/pci/pci.h:164: parse error before "byte"

/usr/include/pci/pci.h:184: parse error before "u32"

In file included from if-mib/data_access/interface_linux.c:29:

/usr/include/linux/ethtool.h:15: parse error before "u32"

/usr/include/linux/ethtool.h:17: parse error before "advertising"

/usr/include/linux/ethtool.h:18: parse error before "speed"

/usr/include/linux/ethtool.h:19: parse error before "duplex"

/usr/include/linux/ethtool.h:20: parse error before "port"

/usr/include/linux/ethtool.h:21: parse error before "phy_address"

/usr/include/linux/ethtool.h:22: parse error before "transceiver"

/usr/include/linux/ethtool.h:23: parse error before "autoneg"

/usr/include/linux/ethtool.h:24: parse error before "maxtxpkt"

/usr/include/linux/ethtool.h:25: parse error before "maxrxpkt"

/usr/include/linux/ethtool.h:26: parse error before "reserved"

/usr/include/linux/ethtool.h:27: parse error before '}' token

/usr/include/linux/ethtool.h:32: parse error before "u32"

/usr/include/linux/ethtool.h:40: parse error before "eedump_len"

/usr/include/linux/ethtool.h:41: parse error before "regdump_len"

/usr/include/linux/ethtool.h:47: parse error before "u32"

/usr/include/linux/ethtool.h:49: parse error before "wolopts"

/usr/include/linux/ethtool.h:50: parse error before "sopass"

/usr/include/linux/ethtool.h:51: parse error before '}' token

/usr/include/linux/ethtool.h:55: parse error before "u32"

/usr/include/linux/ethtool.h:61: parse error before "u32"

/usr/include/linux/ethtool.h:62: conflicting types for `version'

/usr/include/linux/ethtool.h:34: previous declaration of `version'

/usr/include/linux/ethtool.h:63: parse error before "len"

/usr/include/linux/ethtool.h:64: parse error before "data"

/usr/include/linux/ethtool.h:64: conflicting types for `data'

/usr/include/linux/ethtool.h:56: previous declaration of `data'

/usr/include/linux/ethtool.h:65: parse error before '}' token

/usr/include/linux/ethtool.h:69: parse error before "u32"

/usr/include/linux/ethtool.h:71: parse error before "offset"

/usr/include/linux/ethtool.h:72: parse error before "len"

/usr/include/linux/ethtool.h:73: parse error before "data"

/usr/include/linux/ethtool.h:74: parse error before '}' token

if-mib/data_access/interface_linux.c: In function `netsnmp_arch_interface_get_if_speed':

if-mib/data_access/interface_linux.c:395: storage size of `edata' isn't known

make[2]: *** [if-mib/data_access/interface_linux.lo] Error 1

make[2]: Leaving directory `/home/zj/net-snmp-5.2.2/agent/mibgroup'

make[1]: *** [subdirs] Error 1

make[1]: Leaving directory `/home/zj/net-snmp-5.2.2/agent'

make: *** [subdirs] Error 1


请问这是什么原因?该如何解决?多谢!!

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
2 [报告]
发表于 2007-08-26 20:24 |只看该作者
你看看该错误前面的部分,最大的可能是少了某个头文件,也就是说缺少某个库。

论坛徽章:
0
3 [报告]
发表于 2007-08-27 10:35 |只看该作者
多谢版主,我再折腾折腾~~~~  

论坛徽章:
0
4 [报告]
发表于 2007-08-27 23:20 |只看该作者


还是没折腾出原因~~~

不过,改用rpm包安装成功了,安装 redhat9 第二张盘中3个包:

net-snmp-5.0.6 .....
net-snmp-devel-5.0.6 ....
net-snmp-util-5.0.6 .....

安装后,启动net-snmp:
#/etc/rc.d/init.d/snmpd start

检验:
#cd /usr/bin
#snmpget -v2c -c public localhost sysDescr.0

将显示:
#SNMPv2-MIB::sysDescr.0 = STRING:Linux  ...........
类似的信息。

继续折腾~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP