当前位置: 代码迷 >> 综合 >> 编译keepalived netlink-kernel.h:193:2: 错误:未知的类型名‘__u32’ __u32 group;
  详细解决方案

编译keepalived netlink-kernel.h:193:2: 错误:未知的类型名‘__u32’ __u32 group;

热度:103   发布时间:2023-10-18 00:49:24.0
In file included from global_parser.c:56:0:
../../keepalived/include/namespaces.h:42:49: 警告:‘struct nl_sock’在形参表内部声明 [默认启用]extern int nl_ipvs_connect(const char *, struct nl_sock *);^
../../keepalived/include/namespaces.h:42:49: 警告:它的作用域仅限于此定义或声明,这可能并不是您想要的 [默认启用]CC       keepalived_netlink.oCC       namespaces.o
In file included from /usr/include/netlink/handlers.h:19:0,from /usr/include/netlink/socket.h:16,from namespaces.c:171:
/usr/include/netlink/netlink-kernel.h:193:2: 错误:未知的类型名‘__u32’__u32 group;^
make[2]: *** [namespaces.o] 错误 1
make[2]: 离开目录“/root/keepalived-2.1.5/keepalived/core”
make[1]: *** [all-recursive] 错误 1
make[1]: 离开目录“/root/keepalived-2.1.5/keepalived”
make: *** [all-recursive] 错误 1

看到就心态蹦了,啥玩意,刚刚才整好一个服务器,换了一台就给我玩这个。。。而且/usr/include/netlink/netlink-kernel.h这个文件在已部署好的是没有的。。。

总感觉就是差依赖

yum install curl gcc openssl-devel libnl3-devel net-snmp-devel libnfnetlink-devel -y

跑完这个就over了,真不好找。

  相关解决方案