Chinaunix首页 | 论坛 | 博客
  • 博客访问: 955412
  • 博文数量: 245
  • 博客积分: 11429
  • 博客等级: 上将
  • 技术积分: 2662
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-15 00:16
文章存档

2011年(56)

2010年(174)

2009年(15)

分类: LINUX

2010-09-17 15:00:19

 编译ipvsadm  libipvs 时出错

[root@monitor ipvsadm-1.23]# make
make -C libipvs
make[1]: Entering directory `/opt/lvs/ipvsadm-1.23/libipvs'
gcc -Wall -Wunused -Wstrict-prototypes -g -O2 -I/usr/src/linux/include  -DHAVE_NET_IP_VS_H -c -o libipvs.o libipvs.c
In file included from libipvs.c:23:
libipvs.h:14:23: error: net/ip_vs.h: No such file or directory
In file included from libipvs.c:23:
libipvs.h:119: error: expected ?.?.before ?.wmark?
libipvs.c:27: error: field ?.vc?.has incomplete type
libipvs.c:28: error: field ?.est?.has incomplete type
libi
libipvs.c:189: error: dereferencing pointer to incomplete type
libipvs.c:189: error: dereferencing pointer to incomplete type
libipvs.c:191: error: dereferencing pointer to incomplete type
libipvs.c:191: error: dereferencing pointer to incomplete type
libipvs.c:193: error: dereferencing pointer to incomplete type
libipvs.c:193: error: dereferencing pointer to incomplete type
libipvs.c:195: error: dereferencing pointer to incomplete type
libipvs.c:195: error: dereferencing pointer to incomplete type
libipvs.c: In function ?.pvs_sort_services?.
libipvs.c:204: error: dereferencing pointer to incomplete type
libipvs.c:204: error: dereferencing pointer to incomplete type
libipvs.c:205: error: invalid application of ?.izeof?.to incomplete type ?.pvs_service_entry_t?.
libipvs.c: In function ?.pvs_get_dests?.
libipvs.c:214: error: dereferencing pointer to incomplete type
libipvs.c:214: error: invalid application of ?.izeof?.to incomplete type ?.pvs_dest_entry_t?.
libipvs.c:214: error: dereferencing pointer to incomplete type
libipvs.c:220: error: dereferencing pointer to incomplete type
libipvs.c:220: error: dereferencing pointer to incomplete type
libipvs.c:221: error: dereferencing pointer to incomplete type
libipvs.c:221: error: dereferencing pointer to incomplete type

libipvs.c:255: error: expected ?.?.before ?.wmark?

libipvs.c:303: error: dereferencing pointer to incomplete type
libipvs.c:309: error: ?.P_VS_SO_GET_DAEMON?.undeclared (first use in this function)
libipvs.c: In function ?.pvs_strerror?.
libipvs.c:351: error: ?.pvs_get_service?.undeclared (first use in this function)
make[1]: *** [libipvs.o] Error 1
make[1]: Leaving directory `/opt/lvs/ipvsadm-1.23/libipvs'
make: *** [libs] Error 2
是因为缺少库文件

解决方法为:
uname -r
2.6.18-164.el5

ln -s /usr/src/kernels/2.6.18-194.11.3.el5-i686/ /usr/src/linux

但是有时你找不到这个内核的路径,网上很多都是以上的解决方法连接,可有的系统安装完后并没有kernerls的目录
解决方法:yum install kernel-devel
接下来在进行连接 编译 就ok了!

阅读(4041) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~