The error content is as follows
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))); 。。。。。。
Cause:
In versions after redis 6.0.0, compiling redis needs to support the C11 feature, which was introduced in 4.9.
Centos7 default gcc version is 4.8.5, so you need to upgrade the gcc version.
Execute the following command
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
Perfect solution:
The above is the detailed content of How to solve the error when installing redis6.0.6 on Centos. For more information, please follow other related articles on the PHP Chinese website!