CentOS7.5安装Redis问题:fatal error: jemalloc/jemalloc.h: No such file or directory

cd src && make all make[1]: Entering directory `/root/redis-4.0.14/src’ CC Makefile.dep make[1]: Leaving directory `/root/redis-4.0.14/src’ make[1]: Entering directory `/root/redis-4.0.14/src’ CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory #include <jemalloc/jemalloc.h> ^ compilation terminated. make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/root/redis-4.0.14/src’ make: *** [all] Error 2 上面抛出 …

struct redisServer’ has no member named ‘maxmemory’

#升级到 5.3及以上版本 yum -y install centos-release-scl yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils scl enable devtoolset-9 bash #注意:scl命令启用只是临时的,推出xshell或者重启就会恢复到原来的gcc版本。 #如果要长期生效的话,执行如下: echo “source /opt/rh/devtoolset-9/enable” >>/etc/profile