免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2972 | 回复: 3

[Web] ipvsadm 安装遇到的问题 [复制链接]

论坛徽章:
0
发表于 2010-11-12 11:23 |显示全部楼层
我在虚拟机上安装ipvsadm ,遇到下面的问题,请各位大虾指点迷津,在此请高手指点一下!

环境如下:
vmware workstation 7下centos 5.5: 内核如下:2.6.18-194.el5
ipvsadm-1.24 软件,已经建立了  /usr/src/linux -> 2.6.18-194.26.1.el5-i686/

但是当我进入到ipvsadm-1.24目录下,执行: make 报错,如下所示:

make -C libipvs
make[1]: Entering directory `/tmp/ipvsadm-1.24/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 ‘fwmark’
libipvs.c:27: error: field ‘svc’ has incomplete type
libipvs.c:28: error: field ‘dest’ has incomplete type
libipvs.c: In function ‘ipvs_init’:
libipvs.c:40: error: invalid application of ‘sizeof’ to incomplete type ‘struct ip_vs_getinfo’
libipvs.c:44: error: ‘IP_VS_SO_GET_INFO’ undeclared (first use in this function)
libipvs.c:44: error: (Each undeclared identifier is reported only once
libipvs.c:44: error: for each function it appears in.)
libipvs.c: In function ‘ipvs_getinfo’:
libipvs.c:56: error: invalid application of ‘sizeof’ to incomplete type ‘struct ip_vs_getinfo’
libipvs.c:57: error: ‘IP_VS_SO_GET_INFO’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_version’:
libipvs.c:64: error: invalid use of undefined type ‘struct ip_vs_getinfo’
libipvs.c: In function ‘ipvs_flush’:
libipvs.c:70: error: ‘IP_VS_SO_SET_FLUSH’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_add_service’:
libipvs.c:79: error: ‘IP_VS_SO_SET_ADD’ undeclared (first use in this function)
libipvs.c:79: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_update_service’:
libipvs.c:87: error: ‘IP_VS_SO_SET_EDIT’ undeclared (first use in this function)
libipvs.c:87: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_del_service’:
libipvs.c:95: error: ‘IP_VS_SO_SET_DEL’ undeclared (first use in this function)
libipvs.c:95: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_zero_service’:
libipvs.c:103: error: ‘IP_VS_SO_SET_ZERO’ undeclared (first use in this function)
libipvs.c:103: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_add_dest’:
libipvs.c:109: error: dereferencing pointer to incomplete type
libipvs.c:109: error: dereferencing pointer to incomplete type
libipvs.c:112: error: ‘IP_VS_SO_SET_ADDDEST’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_update_dest’:
libipvs.c:119: error: dereferencing pointer to incomplete type
libipvs.c:119: error: dereferencing pointer to incomplete type
libipvs.c:122: error: ‘IP_VS_SO_SET_EDITDEST’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_del_dest’:
libipvs.c:129: error: dereferencing pointer to incomplete type
libipvs.c:129: error: dereferencing pointer to incomplete type
libipvs.c:132: error: ‘IP_VS_SO_SET_DELDEST’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_set_timeout’:
libipvs.c:140: error: ‘IP_VS_SO_SET_TIMEOUT’ undeclared (first use in this function)
libipvs.c:141: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_start_daemon’:
libipvs.c:148: error: ‘IP_VS_SO_SET_STARTDAEMON’ undeclared (first use in this function)
libipvs.c:149: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_stop_daemon’:
libipvs.c:156: error: ‘IP_VS_SO_SET_STOPDAEMON’ undeclared (first use in this function)
libipvs.c:157: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_get_services’:
libipvs.c:166: error: dereferencing pointer to incomplete type
libipvs.c:167: error: invalid application of ‘sizeof’ to incomplete type ‘ipvs_service_entry_t’
libipvs.c:167: error: invalid use of undefined type ‘struct ip_vs_getinfo’
libipvs.c:172: error: dereferencing pointer to incomplete type
libipvs.c:172: error: invalid use of undefined type ‘struct ip_vs_getinfo’
libipvs.c:174: error: ‘IP_VS_SO_GET_SERVICES’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_cmp_services’:
libipvs.c:189: error: dereferencing pointer to incomplete type
libipvs.c:189: 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:197: error: dereferencing pointer to incomplete type
libipvs.c:197: error: dereferencing pointer to incomplete type
libipvs.c:201: error: dereferencing pointer to incomplete type
libipvs.c:201: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_sort_services’:
libipvs.c:208: error: dereferencing pointer to incomplete type
libipvs.c:208: error: dereferencing pointer to incomplete type
libipvs.c:209: error: invalid application of ‘sizeof’ to incomplete type ‘ipvs_service_entry_t’
libipvs.c: In function ‘ipvs_get_dests’:
libipvs.c:218: error: dereferencing pointer to incomplete type
libipvs.c:218: error: invalid application of ‘sizeof’ to incomplete type ‘ipvs_dest_entry_t’
libipvs.c:218: error: dereferencing pointer to incomplete type
libipvs.c:224: error: dereferencing pointer to incomplete type
libipvs.c:224: error: dereferencing pointer to incomplete type
libipvs.c:225: error: dereferencing pointer to incomplete type
libipvs.c:225: error: dereferencing pointer to incomplete type
libipvs.c:226: error: dereferencing pointer to incomplete type
libipvs.c:226: error: dereferencing pointer to incomplete type
libipvs.c:227: error: dereferencing pointer to incomplete type
libipvs.c:227: error: dereferencing pointer to incomplete type
libipvs.c:228: error: dereferencing pointer to incomplete type
libipvs.c:228: error: dereferencing pointer to incomplete type
libipvs.c:231: error: ‘IP_VS_SO_GET_DESTS’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_cmp_dests’:
libipvs.c:243: error: dereferencing pointer to incomplete type
libipvs.c:243: error: dereferencing pointer to incomplete type
libipvs.c:247: error: dereferencing pointer to incomplete type
libipvs.c:247: error: dereferencing pointer to incomplete type
libipvs.c: In function ‘ipvs_sort_dests’:
libipvs.c:253: error: dereferencing pointer to incomplete type
libipvs.c:253: error: dereferencing pointer to incomplete type
libipvs.c:254: error: invalid application of ‘sizeof’ to incomplete type ‘ipvs_dest_entry_t’
libipvs.c: At top level:
libipvs.c:259: error: expected ‘)’ before ‘fwmark’
libipvs.c: In function ‘ipvs_get_timeout’:
libipvs.c:288: error: dereferencing pointer to incomplete type
libipvs.c:293: error: ‘IP_VS_SO_GET_TIMEOUT’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_get_daemon’:
libipvs.c:309: error: dereferencing pointer to incomplete type
libipvs.c:315: error: ‘IP_VS_SO_GET_DAEMON’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_strerror’:
libipvs.c:357: error: ‘ipvs_get_service’ undeclared (first use in this function)
make[1]: *** [libipvs.o] Error 1
make[1]: Leaving directory `/tmp/ipvsadm-1.24/libipvs'
make: *** [libs] Error 2

不知道什么原因,希望大家给个意见、  谢谢~~

论坛徽章:
0
发表于 2010-11-16 10:07 |显示全部楼层
同问,请问怎么解决?谢谢

论坛徽章:
0
发表于 2013-03-17 00:40 |显示全部楼层
我也在做lvs集群,求精通的大神指导,谢谢。   QQ:467291838

论坛徽章:
0
发表于 2013-03-17 08:08 |显示全部楼层
本帖最后由 llzqq 于 2013-03-17 08:10 编辑

配置VIP转发器

1. 确认内核已经包括了ipvs的补丁

# modprobe ip_vs
# cat /proc/net/ip_vs
IP Virtual Server version 1.2.1 (size=4096)
..

2. 安装依赖包

# yum -y install  kernel-devel openssl-devel

3. 安装ipvsadm
...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP