Redis安装报错:zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory

1. 错误信息:

cd src && make install
make[1]: Entering directory `/root/redis-6.2.6/src'
    CC Makefile.dep
make[1]: Leaving directory `/root/redis-6.2.6/src'
make[1]: Entering directory `/root/redis-6.2.6/src'
    CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
                               ^
compilation terminated.
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/root/redis-6.2.6/src'
make: *** [install] Error 2

2. 解决方法:

make MALLOC=libc

Redis安装报错:zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
Redis安装报错:zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory

3. 再次安装

make PREFIX=/apps/redis install

Redis安装报错:zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
Redis安装报错:zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory

上一篇:最细CentOS在线安装Redis,易上手


下一篇:Golang之slice操作