免费注册 查看新帖 |

Chinaunix

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

[服务应用] keepalived 在centos7上编译报错,求助 [复制链接]

论坛徽章:
0
发表于 2016-12-10 19:29 |显示全部楼层
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for linux/netlink.h... no
configure: error: Missing/unusable kernel header file <linux/netlink.h>
[root@localhost keepalived-1.2.24]#


论坛徽章:
0
发表于 2016-12-10 19:40 |显示全部楼层
缺了这个头文件,装上再试试吧

论坛徽章:
17
巨蟹座
日期:2014-11-20 23:04:5215-16赛季CBA联赛之北控
日期:2018-08-01 16:08:4015-16赛季CBA联赛之浙江
日期:2017-12-08 11:25:2415-16赛季CBA联赛之四川
日期:2016-11-21 00:16:50操作系统版块每日发帖之星
日期:2016-07-28 06:20:0015-16赛季CBA联赛之吉林
日期:2016-05-25 15:36:04操作系统版块每日发帖之星
日期:2016-02-12 06:20:002015亚冠之西悉尼流浪者
日期:2015-08-28 14:48:322015亚冠之平阳省
日期:2015-08-19 14:54:162015亚冠之武里南联
日期:2015-07-07 10:49:112015亚冠之城南
日期:2015-06-22 10:15:002015亚冠之山东鲁能
日期:2015-06-18 18:03:44
发表于 2016-12-12 12:37 |显示全部楼层
缺内核头文件

论坛徽章:
0
发表于 2017-05-15 16:16 |显示全部楼层
遇到同样的问题,我的环境是centos7编译安装keepalived-1.3.5时报的错,具体问题信息如下:
[root@haproxy keepalived-1.3.5]# ./configure --sysconf=/etc --sbindir=/usr/sbin/ --with-kernel-dir=/usr/src/kernels/3.10.0-514.el7.x86_64/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for strip... strip
checking for ldd... ldd
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to run the C preprocessor... gcc -E
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for linux/netlink.h... no
configure: error: Missing/unusable kernel header file <linux/netlink.h>


求大神们帮忙指导,谢谢。

论坛徽章:
0
发表于 2017-05-15 16:59 |显示全部楼层
此问题已经解决,CentOS7跟CentOS6的头文件路径有差别,把最后一个参数去掉就可以在CentOS7下面编译过去了。
[root@haproxy keepalived-1.3.5]# ./configure --sysconf=/etc --sbindir=/usr/sbin/
主要是--with-kernel-dir=/usr/src/kernels/3.10.0-514.el7.x86_64/这个参数在CentOS7下面跟在CentOS6下面的头文件路径链接不一样。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP