Redis 2.6.9 安装报错,提示:

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

解决办法是:

make MALLOC=libc

Redis安装报错error:jemalloc/jemalloc.h:Nosuchfileordirectory解决方法

错误描述 安装Redis 2.8.18时报错: 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.8.18时报错

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

原因分析

在README 有这个一段话。

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

说关于分配器allocator, 如果有MALLOC 这个 环境变量, 会有用这个环境变量的 去建立Redis。

而且libc 并不是默认的 分配器, 默认的是 jemalloc, 因为 jemalloc 被证明 有更少的 fragmentation problems 比libc。

但是如果你又没有jemalloc 而只有 libc 当然 make 出错。 所以加这么一个参数。

解决办法

make MALLOC=libc

jemalloc/jemalloc.h: No such file or directory的更多相关文章

  1. 【Redis】编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory

    [Redis]编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory 在安装redis进行编译 ...

  2. redis 安装报错 jemalloc/jemalloc.h: No such file or directory。

    对于redis安装的这个错误,我在博客redis 安装 与错误解决办法最后有提及,但是网上大部分文章的对这个问题的解答都是有误的.所以在这里单列出来. 错误内容: jemalloc/jemalloc. ...

  3. 编译 redis 报错 error: jemalloc/jemalloc.h: No such file or directory

    gcc编译redis时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2 ...

  4. Centos7 安装Redis,报错[adlist.o] Error jemalloc/jemalloc.h: No such file or directory

    redis官网 https://redis.io/download 安装 $ wget http://download.redis.io/releases/redis-5.0.4.tar.gz $ t ...

  5. Linux安装redis报错:jemalloc/jemalloc.h: No such file or directory踩坑

    报错内容: 针对这个错误,我们可以在README.md 文件中看到解释: --------- Selecting a non-default memory allocator when buildin ...

  6. (转)win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    原文地址:http://www.cnblogs.com/fnng/p/4115607.html 作者:虫师 今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-pyth ...

  7. win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-python 时报错: _mysql.c _mysql.c(42) : fatal error C1083: Can ...

  8. 无法打开包括文件:“windows.h”: No such file or directory

      VS2012 出现如下错误: 无法打开包括文件:"windows.h": No such file or directory   解决办法,将 C:\Program Files ...

  9. “stdafx.h”: No such file or directory

    “stdafx.h”: No such file or directory 一般原因是建工程的时候选择了空工程,然后添加现有源文件(含stdafx.cpp) 或者 修改了已有的stdafx.cpp 或 ...

随机推荐

  1. Java:Date、Calendar、Timestamp的使用

    一.Java.util.Date 该对象包含了年月日时分秒信息.具体使用如下代码: //String 转换为Date private static void dateDemo() throws Par ...

  2. Android 点击事件,4种回调。

    1.  继承监听接口. 2.  xml方式 : 设置 android:onClick 3. 内部类 4. 匿名类 ------------------------------------------- ...

  3. 网页快照 - C#实现

    /// <summary> /// 图片类型枚举 /// </summary> public enum ImageType { GIF = , JPG = , PNG = } ...

  4. jQuery 遍历后代

    后代是子.孙.曾孙等等. 通过 jQuery,您能够向下遍历 DOM 树,以查找元素的后代. 向下遍历 DOM 树 下面是两个用于向下遍历 DOM 树的 jQuery 方法: children() f ...

  5. JavaScript中的作用域和闭包

    首先强烈安利<你不知道的JavaScript>,JS初学者进阶必读. 对于从C++.Java等静态语言转向JavaScript的初学者(比如我)来说,JS一些与众不同而又十分要紧的特性使得 ...

  6. 时区之痒 - 从手机GPS模块获取的时间,真的是北京时间么?

    去年互联网地图行业开始引入众包模式,国内比较大的地图商,比如四维图新.高德地图.百度地图纷纷开始推出UGC应用,众包给用户采集门址.公交站等信息,并按照工作量给与采集者一定的回报.我曾经玩过某德推出的 ...

  7. pc110301QWERTYU

    水题一道,SOLVED只是次数的问题.map一下,就是很easy啦. #include<iostream> #include<cstdio> #include<cstri ...

  8. BOM 之 window

    BOM 之 window 对象 在网页中定义的任何一个对象,变量和函数,都以 window 作为其 Global 对象,因此有权访问别的方法和属性    var age = 26;    functi ...

  9. Android特效--粒子效果之雨

    1. 单个雨点的行为 2. 完善雨点的行为和构造下雨场景 3. 在XML中定义可以控制下雨的属性 --------------------------------------------------- ...

  10. Winbind authentication against active directory

    Winbind authentication against active directory Description This tip will describe how to configure ...