linux 上安裝redis 解壓之后使用make命令報錯


錯誤信息:

 In file included from adlist.c:34:0:
zmalloc.h:50:31: 致命錯誤:jemalloc/jemalloc.h:沒有那個文件或目錄
#include <jemalloc/jemalloc.h>

 

若出現【zmalloc.h:50:31: 致命錯誤:jemalloc/jemalloc.h:沒有那個文件或目錄】,則運行命令make MALLOC=libc)

 

解決方案1:
[root@WEB redis-3.0.6]# make
cd src && make all
make[1]: 進入目錄“/root/lnmp_soft/redis-3.0.6/src”
CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: 致命錯誤:jemalloc/jemalloc.h:沒有那個文件或目錄
#include <jemalloc/jemalloc.h>
^
編譯中斷。
make[1]: [adlist.o] 錯誤 1
make[1]: 離開目錄“/root/lnmp_soft/redis-3.0.6/src”
make: 
[all] 錯誤 2

解決1命令如下
[root@WEB redis-3.0.6]# make MALLOC=libc

cd src && make all
不知道是啥start:make[1]: 進入目錄“/root/lnmp_soft/redis-3.0.6/src”
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof .o .gcda .gcno.gcov redis.info lcov-html
(cd ../deps && make distclean)
make[2]: 進入目錄“/root/lnmp_soft/redis-3.0.6/deps”
(cd hiredis && make clean) > /dev/null || true

MALLOC這個環境變量用來去建立Redis的

不知道是啥end

 

解決方案2

 

2.cd deps/

3.make hiredis jemalloc linenoise lua geohash-int

 

 4.重新編譯

 

 

make 成功后 提示Hint: It's a good idea to run 'make test'
輸入:make test
錯誤3:make[1]: Entering directory `/root/software/redis-3.0.0/src'
You need tcl 8.5 or newer in order to run the Redis test
原因:沒有安裝tcl
解決方案:yum install -y tcl
然后
make test
然后還是提示Hint: It's a good idea to run 'make test'

只好放大招了:make distclean; make

 

 

方案2有問題 make distclean(清理的不干凈) 換以下解決方案

解決:make clean

make

make test


免責聲明!

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



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