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

在安装redis进行编译时候。出错

解决办法: 使用以下命令

make MALLOC=libc

原因分析:

在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 出错。 所以加这么一个参数

【Redis】编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory的更多相关文章

  1. lua.c:80:31: fatal error: readline/readline.h: No such file or directory

    make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all ...

  2. /msgsrvmgr.cpp:4:26: fatal error: kdl/frames.hpp: No such file or directory #include <kdl/frames.hpp>

    /home/xxx/ros_workspace/src/bp_protocol_bridge/protospot/src/msgsrvmgr.cpp::: fatal error: kdl/frame ...

  3. sh make.sh fatal error: opencv2/opencv.hpp: No such file or directory

    问题: sh make.sh fatal error: opencv2/opencv.hpp: No such file or directory 解决: sudo apt-get install l ...

  4. 「caffe编译bug」python/caffe/_caffe.cpp:10:31: fatal error: numpy/arrayobject.h: No such file or directory

    在Makefile.config找到PYTHON_INCLUDE,发现有点不同: PYTHON_INCLUDE := /usr/include/python2.7 \         /usr/lib ...

  5. 编译openwrt时报错:FMCGenericError.h:34:27: fatal error: libxml/parser.h: No such file or directory

    解决办法: 更新openwrt的feeds,并重新make menuconfig ./script/feeds update -a ./script/feeds install -a

  6. cuda_device_functions.h:32:31: fatal error: cuda/include/cuda.h: 没有那个文件或目录

    问题在复现工程https://github.com/google/hdrnet时遇到. 现象: 解决办法: 修改hdrnet文件夹下的Makefile文件:在在nvcc里面添加路径:-I /usr/l ...

  7. ././include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory 解决办法

    我在编写内核驱动模块的时候报了一个非常奇怪的错误,如下图: 在目录下看了一下确实没有发现这个文件,感觉很奇怪,因为我记得之前编译模块是没有错误的,所以不可能是我代码写的有问题. 查阅了资料很多说要清除 ...

  8. 如何解决编译linux内核(解决声卡问题),遭遇fatal error: linux/limits.h: 没有那个文件或目录

    最近帮一位上海的朋友搞一块小板,在ubuntu15.04 vivid上已经加载了对应了.ko驱动包 但关键是系统根本就枚举不到该声卡ALC5640,试了OpenSUSE也是一样的结果,看来是内核漏加载 ...

  9. 解决Ubuntu16.04 fatal error: json/json.h: No such file or directory

    参考博客 错误产生 安装json-c库之后,根据GitHub上面的readme文件链接到json-c库时出现以下错误: SDMBNJson.h:9:23: fatal error: json/json ...

随机推荐

  1. 手动安装python库

    有些时候由于工作环境的限制如proxy,不能自动安装python 的第三方的库(用python –m pip install package).在这个情况下,只能自己手动安装.以xlwt-1.3.0. ...

  2. scikit-learn数据集下载太慢的问题

    有时候用scikit-learn在线下载数据时太慢,因为网络或者其他原因,这时候我们可以先把数据集下载到本地,然后再把这个数据集放到scikit-learn的data中,首先我们需要找到 scikit ...

  3. Swagger2的使用及注意事项

    一.Swagger的主要作用有两方面: 1.生成在线文档,通过注解方式生成在线文档,方便在定义修正接口时直接修改接口文档: 2.对接口文档在线测试,不用在输入接口地址以及里面的参数对象,可以很方便的对 ...

  4. py-day1-5 python 分割 、 字母大小转换

    # partition() 分割为3段 从左往右遇见的第一个开始 test = 'bassaiwoll' v = test.partition('s') print(v) ('ba', 's', 's ...

  5. HanLP的自定义词典使用方式与注意事项介绍

    [环境]python 2.7 方法一:使用pyhanlp,具体方法如下: pip install pyhanlp  # 安装pyhanlp 进入python安装包路径,如 /usr/lib/pytho ...

  6. ubuntu16 安装matplotlib

    在安装ubuntu安装matplotlib时碰到不少问题,简单做个备忘: 需要先安装其依赖的包libpng和freetype 安装libpng: sudo apt-get install libpng ...

  7. SQL 更新修改删除一个表,库存自动增减的写法

    create trigger tri_asbon asb for insert as begin declare @rk int declare @ck int declare @sid varcha ...

  8. RedHat如何关闭防火墙 : http://blog.csdn.net/chongxin1/article/details/76072758

    版本号:RedHat6.5   JDK1.8   Hadoop2.7.3 hadoop  说明:从版本2开始加入了Yarn这个资源管理器,Yarn并不需要单独安装.只要在机器上安装了JDK就可以直接安 ...

  9. tomcat端口号被占用的问题

    错误原因:8080端口被其他的应用占用! 在网上查了下解决方案,有些说在任务管理窗口关闭javaw.exe,有些说shutdown一下tomcat,亲测在某些场合下可用. 下面是摘自其它博客园里文章的 ...

  10. 初次使用CentOs7遇到的问题

    初次使用CentOs7遇到的问题 1.XXX[用户名]不在sudoers文件中.此事将被报告 解决方案:CentOs自带命令visudo,其作用为调用vim来修改“/etc/sudoers”文件,从而 ...