1. 程式人生 > >In file included from adlist.c:34:0: zmalloc.h:50:31: 致命錯誤:jemalloc/jemalloc.h:沒有那個檔案或目錄

In file included from adlist.c:34:0: zmalloc.h:50:31: 致命錯誤:jemalloc/jemalloc.h:沒有那個檔案或目錄

我報錯是這樣子的,然後老師打了一條命令
[[email protected] 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

命令如下
[[email protected] redis-3.0.6]# make MALLOC=libc

cd src && make all
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的