This article is for you to explain the Redis 2.8.18 installation error error:jemalloc/jemalloc.h:no such file or directory solution, interested students reference. Error Description
Installing the Redis 2.8.18 times wrong:
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 cause analysis
There is this passage in the README.
Allocator
---------
Selecting a Non-default memory allocator when building Redis are 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 is picked because Jemalloc has proven to having fewer
Fragmentation problems than libc malloc.
To force compiling against libc malloc, use:
% make MALLOC=LIBC
To compile against Jemalloc in Mac OS X systems, use:
% make Malloc=jemalloc
Said about the allocator allocator, if there is malloc this environment variable, it will be useful for this environment variable to establish redis.
And libc is not the default allocator, the default is Jemalloc, because Jemalloc is proven to have fewer fragmentation problems than libc.
But if you don't have a jemalloc and only libc of course make a mistake. So add such a parameter. Solutions
Make MALLOC=LIBC