解决方法:

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

然后执行make

转自:初学者安装Redis时报错server.c:5170:31: error: ‘struct redisServer’,解决就是这门简单_MarkJava-CSDN博客