keepalived安装错误一则

keepalived安装时出现的问题及其解决办法
1、
Keepalived安装错误一例(make错误)(本部分拾人牙慧)
/usr/include/sys/types.h:235: 错误:与 ‘blkcnt_t’ 类型冲突
/usr/src/kernels/2.6.18-238.19.1.el5-i686//include/linux/types.h:142: 错误:‘blkcnt_t’ 的上一个声明在此
make[2]: *** [ip_vs_nl_policy.o] 错误 1
make[2]: Leaving directory `/usr/local/src/keepalived-1.2.2/keepalived/libipvs-2.6'
make[1]: *** [all] 错误 1
make[1]: Leaving directory `/usr/local/src/keepalived-1.2.2/keepalived'
make: *** [all] 错误 2


解决方法:
进入源码目录就是你解压的目录了:
cd /usr/local/src/keepalived-1.2.2
vi keepalived/libipvs-2.6/ip_vs.h
找到下面一行:
#include /* For __beXX types in userland */
把他放到下面一行的下面:
#include
我想我说明白了,这是最新版本的问题,如果用keepalived-1.2.1则不会出现这个问题了
2、ipvsadm make时的错误
make[1]: gcc: Command not found
make[1]: *** [libipvs.o] Error 127
make[1]: Leaving directory `/home/wss/lvs/ipvsadm-1.24/libipvs'
make: *** [libs] Error 2
[root@localhost ipvsadm-1.24]#
解决办法
[root@localhost ~]# ln -s /usr/src/kernels/2.6.18-164.el5 /usr/src/linux/

还没有评论,快来抢沙发!

发表评论

  • 😉
  • 😐
  • 😡
  • 😈
  • 🙂
  • 😯
  • 🙁
  • 🙄
  • 😛
  • 😳
  • 😮
  • emoji-mrgree
  • 😆
  • 💡
  • 😀
  • 👿
  • 😥
  • 😎
  • ➡
  • 😕
  • ❓
  • ❗
  • 69 queries in 0.367 seconds