您的位置:首页 >如何解决在 CentOS 安装 Redis 6.0.6 时出现的错误?
发布于2023-04-27 阅读(0)
扫一扫,手机访问
报错内容如下
In file included from server.c:31:0: server.c:4999:59: error: ‘struct redisServer’ has no member named ‘cluster’ (server.cluster_enabled && nodeIsMaster(server.cluster->myself))); 。。。。。。
原因:
自 redis 6.0.0+ 之后的版本中,编译 redis 需要支持 C11 特性,C11 特性在 4.9 中被引入。
Centos7 默认 gcc 版本为 4.8.5,所以需要升级gcc版本。
执行如下命令
yum -y install gcc gcc-c++ make tcl yum -y install centos-release-scl yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils scl enable devtoolset-9 bash
完美解决:

上一篇:java如何实现打砖块游戏
下一篇:Redis缓存雪崩怎么解决
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
正版软件
正版软件
正版软件
正版软件
正版软件
1
2
3
7
9