如何在 CentOS 5.9 上从源代码构建?

如何在 CentOS 5.9 上从源代码构建?

我正在建造iptraf-ng在 CentOS 5.9 上遇到以下错误:

src/packet.c: In function ‘packet_process’:
src/packet.c:322: error: ‘ETH_P_QINQ1’ undeclared (first use in this function)
src/packet.c:322: error: (Each undeclared identifier is reported only once
src/packet.c:322: error: for each function it appears in.)
src/packet.c:323: error: ‘ETH_P_QINQ2’ undeclared (first use in this function)
src/packet.c:324: error: ‘ETH_P_QINQ3’ undeclared (first use in this function)
src/packet.c:325: error: ‘ETH_P_8021AD’ undeclared (first use in this function)

我假设这是由于构建时未正确查看内核或网络接口常量定义。这是在虚拟机上,普通版本的 straightiptraf无法与 vnet0 配合使用。

在这里包含支持库以进行编译的正确步骤是什么?

注:我也尝试过构建源 rpm以及,然而这似乎是一场必败之战这里

答案1

您要么没有安装内核头文件,要么这些符号是在内核版本 2.6.19 或更新版本中引入的。在后一种情况下,您运气不佳,应该升级到 centos 6。

相关内容