编译Redis出错

来源:互联网 发布:mac os win10双系统 编辑:程序博客网 时间:2024/06/06 12:52

make编译出错

makezmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/data0/src/redis-2.6.2/src'make: *** [all] Error 2

使用即可

make MALLOC=libc

查看readme

Selecting a non-default memory allocator when building Redis is done by setting  
the `MALLOC` environment variable. Redis is compiled and linked against libc  
malloc by default, with the exception of jemalloc being the default on Linux  
systems. This default was picked because jemalloc has proven to have fewer  
fragmentation problems than libc malloc.  
 
To force compiling against libc malloc, use:  
 
    % make MALLOC=libc  
 
To compile against jemalloc on Mac OS X systems, use:  
 
    % make MALLOC=jemalloc

默认使用jemalloc参数编译,但如果当前服务器没有jemalloc就只有使用参数libc

0 0
原创粉丝点击