免费注册 查看新帖 |

Chinaunix

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

安装IPTABLES时,编译内核报错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-19 20:57 |只看该作者 |倒序浏览
我的系统是AS4.0.版本为2.6.9-5.EL
我现在想安装IPTABLES,在编译内核的时候报以下错误,是参考白金兄的文档进行操作的
我在运行# KERNEL_DIR=/usr/src/linux-2.6.13 IPTABLES_DIR=/usr/src/iptables-1.3.3 ./runme extra这个命令的时候,下面有很多类似这样的报错

Testing TRACE... not applied
The TRACE patch:
   Author: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
   Status: Testing.


-----------------------------------------------------------------
Do you want to apply this patch [N/y/t/f/a/r/b/w/q/?] y
patchlets/TRACE has dependency on raw, but raw is not known
patchlets/TRACE has dependency on raw, but raw is not known
----------------------------------------------------------------

The ACCOUNT patch:
   Author: Intra2net AG <opensource@intra2net.com>
   Status: Beta

Do you want to apply this patch [N/y/t/f/a/r/b/w/q/?] y
cannot apply (1 rejects out of 2 hunks)

论坛徽章:
0
2 [报告]
发表于 2006-01-20 12:49 |只看该作者
我的是AS 3.0 kernel 2.4.20
我现在正升级内核到2.6.14.6 iptables 准备用1.3.1已经试过iptables 1.3.4在运用-m string --string发现不能用.
升级了n次了,编译时倒没啥问题,启动时老是报错.

论坛徽章:
0
3 [报告]
发表于 2006-01-20 14:01 |只看该作者
请问一下你编译的过程是怎么样的?步骤,有自己做文档吗?共享一下,谢谢,

我是从AS4.0升级的,

论坛徽章:
0
4 [报告]
发表于 2006-01-20 14:29 |只看该作者
在编译make modules报如下错误

make[1]: *** [net/ipv4/netfilter/ip_conntrack_standalone.o] error 1
make: *** [_module_net/ipv4/netfilter]  error 2

论坛徽章:
0
5 [报告]
发表于 2006-01-20 16:06 |只看该作者
在执行make modules时报以下错误

net/ipv4/netfilter/ipt_time.c: In function `match':
net/ipv4/netfilter/ipt_time.c:59: error: structure has no member named `stamp'
net/ipv4/netfilter/ipt_time.c:60: error: structure has no member named `stamp'
net/ipv4/netfilter/ipt_time.c:63: error: structure has no member named `stamp'
net/ipv4/netfilter/ipt_time.c:63: error: structure has no member named `stamp'
net/ipv4/netfilter/ipt_time.c:67: error: structure has no member named `stamp'
make[3]: *** [net/ipv4/netfilter/ipt_time.o] error 1
make[2]: *** [net/ipv4/netfilter] error 2
make[1]: *** [net/ipv4] error 2
make: *** [net] error 2

论坛徽章:
0
6 [报告]
发表于 2006-01-20 16:37 |只看该作者
建议不要用系统自带的内核进行编译,我就在AS3 up6下,用自带的内核编译成功过一些模块,内核下载最新的2.6.14以上的版本内核进行编译,Patch-o-matic...中的模块需要更新的内核支持,而且加载的时候不要都加上,有选择的,比如time、iprange、geoip、ipp2p等一些用处大的,以后你熟了之后再加上别的。。。即使加上了,编译也不能保证个个通过

[ 本帖最后由 R9_Alien 于 2006-1-20 16:54 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2006-01-20 19:04 |只看该作者
我是这么做的,编译这选择行的,可,版本uname -r还是原先的版本,

在make 安装iptables的时候也显示ipv4没有安装之类的错误

论坛徽章:
0
8 [报告]
发表于 2006-01-20 21:38 |只看该作者
好了,现在在做:
cd /usr/src/iptables-1.3.3
export KERNEL_DIR=/usr/local/src/linux-2.6.15.1
export IPTABLES_DIR=/usr/local/src/iptables-1.3.3
make BINDIR=/sbin LIBDIR=/lib MANDIR=/usr/share/man install
在这个时候,报如下错误:
extensions/libipt_connbytes.c:192: error: invalid application of `sizeof' to incomplete type `ipt_connbytes_info'
extensions/libipt_connbytes.c:193: error: invalid application of `sizeof' to incomplete type `ipt_connbytes_info'
make: *** [extensions/libipt_connbytes_sh.o] error 1

具体的错误是:
cc -O2 -Wall -Wunused -I/usr/local/src/linux-2.6.15.1/include -Iinclude/ -DIPTABLES_VERSION=\"1.3.3\"  -fPIC -o extensions/libipt_connbytes_sh.o -c extensions/libipt_connbytes.c
In file included from extensions/libipt_connbytes.c:9:
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:19: error: syntax error before "aligned_u64"
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:19: warning: no semicolon at end of struct or union
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:19: warning: no semicolon at end of struct or union
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:20: warning: type defaults to `int' in declaration of `to'
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:20: warning: data definition has no type or storage class
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:21: warning: type defaults to `int' in declaration of `count'
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:21: warning: data definition has no type or storage class
/usr/local/src/linux-2.6.15.1/include/linux/netfilter_ipv4/ipt_connbytes.h:24: error: syntax error before '}' token
extensions/libipt_connbytes.c: In function `parse_range':
extensions/libipt_connbytes.c:35: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:38: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:41: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:43: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:43: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:45: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:45: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c: In function `parse':
extensions/libipt_connbytes.c:66: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:67: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:67: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:68: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:74: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:76: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:78: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:87: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:87: error: `IPT_CONNBYTES_WHAT_PKTS' undeclared (first use in this function)
extensions/libipt_connbytes.c:87: error: (Each undeclared identifier is reported only once
extensions/libipt_connbytes.c:87: error: for each function it appears in.)
extensions/libipt_connbytes.c:89: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:89: error: `IPT_CONNBYTES_WHAT_BYTES' undeclared (first use in this function)
extensions/libipt_connbytes.c:91: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:91: error: `IPT_CONNBYTES_WHAT_AVGPKT' undeclared (first use in this function)
extensions/libipt_connbytes.c: In function `print_mode':
extensions/libipt_connbytes.c:113: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:114: error: `IPT_CONNBYTES_WHAT_PKTS' undeclared (first use in this function)
extensions/libipt_connbytes.c:117: error: `IPT_CONNBYTES_WHAT_BYTES' undeclared (first use in this function)
extensions/libipt_connbytes.c:120: error: `IPT_CONNBYTES_WHAT_AVGPKT' undeclared (first use in this function)
extensions/libipt_connbytes.c: In function `print_direction':
extensions/libipt_connbytes.c:131: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c: In function `print':
extensions/libipt_connbytes.c:155: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:155: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:156: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:157: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:159: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:160: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c: In function `save':
extensions/libipt_connbytes.c:174: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:174: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:175: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:176: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:178: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c:179: error: dereferencing pointer to incomplete type
extensions/libipt_connbytes.c: At top level:
extensions/libipt_connbytes.c:192: error: invalid application of `sizeof' to incomplete type `ipt_connbytes_info'
extensions/libipt_connbytes.c:193: error: invalid application of `sizeof' to incomplete type `ipt_connbytes_info'
make: *** [extensions/libipt_connbytes_sh.o] error 1

[ 本帖最后由 zxychina 于 2006-1-21 09:48 编辑 ]

论坛徽章:
0
9 [报告]
发表于 2006-01-21 09:37 |只看该作者
在编译:

make modules_install时报以下错误

if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map  2.6.15-5.EL; fi
WARNING: /lib/modules/2.6.15-5.EL/kernel/net/ipv4/netfilter/ipt_IPV4OPTSSTRIP.ko needs unknown symbol skb_ip_make_writable

重新编译后只有这一行
  INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map  2.6.15.1; fi

这样算不算是错误,没有警告,也没有错误,就这么一行

[ 本帖最后由 zxychina 于 2006-1-21 11:27 编辑 ]

论坛徽章:
0
10 [报告]
发表于 2006-01-21 11:30 |只看该作者
[root@mail-test linux-2.6.15.1]# make install
  CHK     include/linux/version.h
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
Kernel: arch/i386/boot/bzImage is ready  (#1)
sh /usr/local/src/linux-2.6.15.1/arch/i386/boot/install.sh 2.6.15.1 arch/i386/boot/bzImage System.map "/boot"
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP