我使用了第二个就成功了
1 使用 make 出现如下情况 说明未安装gcc,使用命令安装gcc:yum install gcc
原因:Redis是C实现的,所以需要gcc来进行编译
[root@localhost redis-4.0.8]# make
cd src && make all
make[1]: Entering directory `/root/redis-4.0.8/src‘
CC adlist.o
/bin/sh: cc: command not found
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory `/root/redis-4.0.8/src‘
make: *** [all] Error 2
2 则将make改为make MALLOC=libc,可能是因为编译库的问题吧。
[root@localhost redis-2.8.17]# make
cd src && make all
make[1]: Entering directory `/root/redis-4.0.8/src‘
CC adlist.o
In file included from adlist.c:34:
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/root/redis-4.0.8/src‘
make: *** [all] Error 2
原文链接:https://blog.csdn.net/qq_40273898/article/details/79427477
微信扫码关注
更新实时通知