#先执行make命令,查看是否成功不报错
make
#再执行make install命令
make install
#报错1:cc: command not found
#解决方法:yum -y install gcc
yum -y install gcc
#报错2:‘xxxxxxxx’ has no member named ‘xxxxx’
#解决方法:
#1. 查看gcc版本是否在5.3以上,centos7.6默认安装4.8.5
gcc -v #gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
#2. 升级gcc
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
#3. 退出XShell重新打开
/usr/local/bin
cp /opt/redis-6.0.3/redis.conf myconf
vim redis.conf
./redis-server myconf/redis.conf
./redis-cli -p 6379
shutdown
exit
原文:https://www.cnblogs.com/yinrz/p/13030931.html