CentOS 7 安装redis过程中fatal error: jemalloc/jemalloc.h: No such file or directory错误
问题:
[root@cnetos7 src]# make install PREFIX=/usr/local/redis
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: *** [adlist.o] Error 1
错误原因:
原因是jemalloc重载了Linux下的ANSI C的malloc和free函数
解决方案:
[root@cnetos7 src]# make MALLOC=libc