安装keepalive错误:types.h:14: error: conflicting types for ‘fd_set’

还是在安装keepalive的时候,进行到make的时候报的错误:

[root@mysql2 keepalived-1.2.16]# make


make -C lib || exit 1;
make[1]: Entering directory `/home/keepalived-1.2.16/lib'
gcc -g -O2 -DFALLBACK_LIBNL1 -I. -Wall -Wunused -Wstrict-prototypes -D_WITHOUT_SNMP_ -c command.c
make[1]: Leaving directory `/home/keepalived-1.2.16/lib'
make -C keepalived
make[1]: Entering directory `/home/keepalived-1.2.16/keepalived'
make[2]: Entering directory `/home/keepalived-1.2.16/keepalived/core'
gcc -g -O2 -DFALLBACK_LIBNL1  -I/usr/src/linux/include -I/usr/src/linux/include -I../include -I../../lib -Wall -Wunused -Wstrict-prototypes -D_KRNL_2_6_ -D_WITH_LVS_ -D_WITH_VRRP_ -D_WITHOUT_SNMP_ -D_WITH_SO_MARK_  -c main.c
gcc -g -O2 -DFALLBACK_LIBNL1  -I/usr/src/linux/include -I/usr/src/linux/include -I../include -I../../lib -Wall -Wunused -Wstrict-prototypes -D_KRNL_2_6_ -D_WITH_LVS_ -D_WITH_VRRP_ -D_WITHOUT_SNMP_ -D_WITH_SO_MARK_  -c layer4.c
In file included from ../include/../libipvs-2.6/ip_vs.h:12,
                 from ../include/check_data.h:38,
                 from ../include/check_api.h:27,
                 from ../include/layer4.h:37,
                 from layer4.c:24:
/usr/src/linux/include/linux/types.h:14: error: conflicting types for ‘fd_set’
/usr/include/sys/select.h:78: note: previous declaration of ‘fd_set’ was here
/usr/src/linux/include/linux/types.h:15: error: conflicting types for ‘dev_t’
/usr/include/sys/types.h:61: note: previous declaration of ‘dev_t’ was here
/usr/src/linux/include/linux/types.h:19: error: conflicting types for ‘nlink_t’
/usr/include/sys/types.h:76: note: previous declaration of ‘nlink_t’ was here
/usr/src/linux/include/linux/types.h:25: error: conflicting types for ‘timer_t’
/usr/include/time.h:104: note: previous declaration of ‘timer_t’ was here
/usr/src/linux/include/linux/types.h:45: error: conflicting types for ‘loff_t’
/usr/include/sys/types.h:45: note: previous declaration of ‘loff_t’ was here
/usr/src/linux/include/linux/types.h:111: error: conflicting types for ‘uint64_t’
/usr/include/stdint.h:56: note: previous declaration of ‘uint64_t’ was here
/usr/src/linux/include/linux/types.h:112: error: conflicting types for ‘u_int64_t’
/usr/include/sys/types.h:204: note: previous declaration of ‘u_int64_t’ was here
/usr/src/linux/include/linux/types.h:113: error: conflicting types for ‘int64_t’
/usr/include/stdint.h:41: note: previous declaration of ‘int64_t’ was here
/usr/src/linux/include/linux/types.h:134: error: conflicting types for ‘blkcnt_t’
/usr/include/sys/types.h:236: note: previous declaration of ‘blkcnt_t’ was here
make[2]: *** [layer4.o] Error 1
make[2]: Leaving directory `/home/keepalived-1.2.16/keepalived/core'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/keepalived-1.2.16/keepalived'
make: *** [all] Error 2


在这之前有个操作ln -s /usr/src/kernels/3.8.13-44.1.1.el6uek.x86_64 /usr/src/linux,这个是照着文档操作的,因为我的内核版本是:

# uname -a
Linux mysql2 3.8.13-44.1.1.el6uek.x86_64 #2 SMP Wed Sep 10 06:10:25 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux

所以我执行的是link的对应版本的kernel文件目录,但是报错,后来link到ln -s /usr/src/kernels/2.6.32-504.el6.x86_64 /usr/src/linux就不报错了。

其实文档中也是link到2.6的kernel目录,没有跟内核对应,可能是不支持这个3.8的内核吧。总之,解决了问题就行了,linux内核相关的内容不太清楚。



你可能感兴趣的:(mysql)