server.c:5151:94: error: ‘struct redisServer’ has no member named ‘unixsocket’
serverLog(LL_NOTICE,“The server is now ready to accept connections at %s”, server.unixsocket);
^
server.c:5152:19: error: ‘struct redisServer’ has no member named ‘supervised_mode’
if (server.supervised_mode == SUPERVISED_SYSTEMD) {
^
server.c:5153:24: error: ‘struct redisServer’ has no member named ‘masterhost’
if (!server.masterhost) {
^
server.c:5166:15: error: ‘struct redisServer’ has no member named ‘maxmemory’
if (server.maxmemory > 0 && server.maxmemory < 10241024) {
^
server.c:5166:39: error: ‘struct redisServer’ has no member named ‘maxmemory’
if (server.maxmemory > 0 && server.maxmemory < 10241024) {
^
server.c:5167:176: error: ‘struct redisServer’ has no member named ‘maxmemory’
serverLog(LL_WARNING,“WARNING: You specified a maxmemory value that is less than 1MB (current value is %llu bytes). Are you sure this is what you really want?”, server.maxmemory);
^
server.c:5170:31: error: ‘struct redisServer’ has no member named ‘server_cpulist’
redisSetCpuAffinity(server.server_cpulist);
原因:这个是gcc版本过低导致的,升级gcc版本到9.0以上即可解决。
解决方案:
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash
gcc -v 查看gcc版本
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile 长期生效