Redis installation error: jemalloc/jemalloc. h: No such file or directory solution, redisjemalloc

Source: Internet
Author: User

Redis installation error: jemalloc/jemalloc. h: No such file or directory solution, redisjemalloc
Error description

When installing Redis 2.8.18, an error is reported:

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

In README, we have this passage.

Allocator
---------
 
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


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.

Solution

Make MALLOC = libc

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.