CentOS6.6 編譯Redis報錯:"Newer version of jemalloc required"


一、前言

  不同系統同一個問題,可能解決方法不一樣,也可能會遇到不同的問題,所以具體情況具體分析,我的系統是Centos6.6, 查看系統命令  cat /etc/issue

二、安裝redis后編譯報錯:Newer version of jemalloc required

[root@server003-bmbic 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
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 `/usr/local/redis-5.0.3/src'
make: *** [all] Error 2

上面提示需要更新jemalloc,那么編譯時可以指定編譯庫進行編譯: make MALLOC=libc

 

三、安裝redis后編譯報錯:command not found make[1]

[root@server003-bmbic 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, 然后再進行編譯。

 

四、總結

以上是我執行過程中遇到的問題,記錄總結下。以上問題可能還有另外的解決方式,如有大神使用並解決過,可以共享下。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM