在ipvsadm安装过程中出现以下错误,导致一直无法安装,在网上搜索了很久也没找到解决方法。
# make
make -C libipvs
make[1]: Entering directory `/var/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.c:79: error: dereferencing pointer to incomplete type
。。。
。。。。
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: At top level:
libipvs.c:33: error: storage size of `ipvs_info' isn't known
libipvs.c:132: error: `IP_VS_SO_SET_DELDEST' undeclared (first use in this function)make[1]: *** [libipvs.o] Error 1make[1]: Leaving directory `/var/tmp/ipvsadm-1.24/libipvs'make: *** [libs] Error 2
最后在官网的wiki上发现原来是无法在/usr/src/linux下找到内核源码,所以无法安装。
[root@localhost /]# cd /usr/src
[root@localhost src]# mkdir linux
[root@localhost src]# rpm -ivh kernel-devel-2.6.18-164.el5.i686.rpm #/usr/src目录下出现kernels目录
[root@localhost src]# cd kernels
[root@localhost kernels]# ls
2.6.18-164.el5-i686这个目录就是源码的位置,下边做一个链接
[root@localhost kernels]# ln -s /usr/src/kernels/2.6.18-164.el5-i686 /usr/src/linux
本文记录了在安装ipvsadm过程中遇到的错误,并详细描述了解决步骤。问题在于编译时未能找到内核源码,通过安装内核开发包并在/usr/src下建立linux软链接指向内核源码目录成功解决了该问题。
411

被折叠的 条评论
为什么被折叠?



