【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. shell基础入门(一)

    //获取输入内容 #!/bin/bash echo "What is your name?" read PERSON read -p "who are you name: ...

  2. 线性代数及其应用 (David C.Lay, Steven R.Lay 著)

    第1章 线性代数中的线性方程组 (已看) 介绍性实例 经济学与工程中的线性模型 1.1 线性方程组 1.2 行化简与阶梯形矩阵 1.3 向量方程 1.4 矩阵方程Ax=b 1.5 线性方程组的解集 1 ...

  3. PowerDesigner V16.5 安装及汉化

    一.power designer是什么以及是干什么的? power designer是能进行数据库设计的强大的软件,是一款开发人员常用的数据库建模工具.分别从概念数据模型(Conceptual Dat ...

  4. 在vue-cli 2.x 项目中,引入stylus的全局CSS变量

    出处:https://blog.csdn.net/weixin_39378610/article/details/81140358

  5. es query_string 和 match 的区别

    默认使用 空格拆分成 多个 子项,并且 每个子项 都会去分词 查询.可以通过 default_operator 指定  子项之间的关系.默认是 或 . 然后 每个 子项前面可以使用 -+ 指定必须有 ...

  6. linux centos6 yum 安装lamp

    centos 6.5 1.yum安装和源代码编译在使用的时候没啥区别,但是安装的过程就大相径庭了,yum只需要3个命令就可以完成,源代码需要13个包,还得加压编译,步骤很麻烦,而且当做有时候会出错,源 ...

  7. ElasticeSearch(五)分布式索引架构

    关于分布式架构 首先将ES默认每个索引是5个分片,这样做得目的是两个一个索引的时候速度更快(将数据写到小分片的尾部比写入大分片尾部更加快):另外一个是当数据量达到一定程度之后,分片查询,在汇总(sca ...

  8. monkey如何获取app包名

    别人学习网址:http://www.51testing.com/html/58/15092658-2984032.html 使用aapt    aapt是sdk自带的一个工具,在sdk\builds- ...

  9. 怎么用fiddler抓APP的包

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/liujingqiu/article/details/79387909Fiddler安装 此处略.我们 ...

  10. 【转】车和家CEO李想回顾创业20年:站在更高层才能看到低层问题

    明天就要上班了,写一下我创业20年经历的五个楼层,每一层的认知回过头来看都是天壤之别,以及无比的幸运.只有到了更高一层,你才可以更好的看到低楼层的问题.希望对你的工作有所帮助. 一层楼,生为一个普通的 ...