CentOS6.6 編譯Redis報錯:"Newer version of jemalloc required"
阿新 • • 發佈:2019-01-09
一、前言
不同系統同一個問題,可能解決方法不一樣,也可能會遇到不同的問題,所以具體情況具體分析,我的系統是Centos6.6, 檢視系統命令 cat /etc/issue
二、安裝redis後編譯報錯:Newer version of jemalloc required
[[email protected] redis-5.0.3]# make cd src && make all make[1]: Entering directory `/usr/local/maple.yuan/redis-5.0.3/src' CC adlist.o Infile 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 `/usr/local/redis-5.0.3/src' make: *** [all] Error 2
上面提示需要更新jemalloc,那麼編譯時可以指定編譯庫進行編譯: make MALLOC=libc
三、安裝redis後編譯報錯:command not found make[1]
[[email protected] redis-5.0.3]# make cd src && make all make[1]: Entering directory `/root/redis-4.0.11 /src‘ CC adlist.o /bin/sh: cc: command not found make[1]: *** [adlist.o] Error 127 make[1]: Leaving directory `/root/redis-2.8.17/src‘ make: *** [all] Error 2
說明沒有安裝gcc或者make, 則可以使用命令安裝:yum install -y gcc g++ gcc-c++ make, 然後再進行編譯。
四、總結
以上是我執行過程中遇到的問題,記錄總結下。以上問題可能還有另外的解決方式,如有大神使用並解決過,可以共享下。