redis编译错误 jemalloc.h: No such file or directory

redis | 2019-12-16 16:13:15

redis编译时出现下面错误:

[root@localhost redis-5.0.7]# make
cd src && make all
make[1]: Entering directory `/usr/local/server/redis-5.0.7/src'
    CC Makefile.dep
make[1]: Leaving directory `/usr/local/server/redis-5.0.7/src'
make[1]: Entering directory `/usr/local/server/redis-5.0.7/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 `/usr/local/server/redis-5.0.7/src'
make: *** [all] Error 2

解决方法

编译时指定库

make MALLOC=libc

 

登录后即可回复 登录 | 注册
    
关注编程学问公众号