报错内容如下
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
完美解决:

以上就是Centos安装redis6.0.6报错怎么解决的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号