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
I have this passage in the README.
allocator
---------
Selecting A Non-default memory allocator when building Redis was done by setting
the ' MALLOC ' environment variable. Redis is compiled and linked against libc
malloc by default, with the exception of the 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:
percent make MALLOC=LIBC &nbs P
to compile against Jemalloc in Mac OS X systems, use:
% make Malloc=j Emalloc
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
That
Make Prefix=/opt/redis malloc=libc Install
Redis 2.8.18 Installation Error error:jemalloc/jemalloc.h:no such file or directory workaround