Redis 2.8.18 installation error, redis2.8.18 Error
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/data0/src/redis-2.6.2/src'
make: *** [all] Error 2
Solution:
Make MALLOC = libc
There is a solution on the Internet. Why should we add this? There is a paragraph in README.
Allocator---------Selecting a non-default memory allocator when building Redis is done by settingthe `MALLOC` environment variable. Redis is compiled and linked against libcmalloc by default, with the exception of jemalloc being the default on Linuxsystems. This default was picked because jemalloc has proven to have fewerfragmentation problems than libc malloc.To force compiling against libc malloc, use: % make MALLOC=libcTo compile against jemalloc on Mac OS X systems, use: % make MALLOC=jemalloc
About the allocator, if there is an environment variable MALLOC, it will use this environment variable to create Redis.
In addition, libc is not the default distributor. The default is jemalloc, because jemalloc has been proved to have fewer fragmentation problems than libc.
However, if you do not have jemalloc, but only libc, of course, make has an error. So add such a parameter.