server.c:5307:31: 错误:‘struct redisServer’没有名为‘server_xxx’的成员
redis编译报上面错误,一般是环境问题,执行下面操作可以解决
1、安装gcc套装:
yum install cpp
yum install binutils
yum install glibc
yum install glibc-kernheaders
yum install glibc-common
yum install glibc-devel
yum install gcc
yum install make
2、升级gcc
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash
3、设置永久升级:
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
4、安装redis:
</article>
网友评论