Linux安装redis报错:jemalloc/jemalloc.h: No such file or directory踩坑
报错内容:
针对这个错误,我们可以在README.md 文件中看到解释:
--------- 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 Verbose build
-------------
网上大部分解决办法都是错误的,如下文:
make MALLOC=libc
正确解决办法(针对2.2以上的版本)
清理上次编译残留文件,重新编译:
make distclean && make
错误的本质是我们在开始执行make 时遇到了错误(大部分是由于gcc未安装),然后我们安装好了gcc 后,我们再执行make ,这时就出现了jemalloc/jemalloc.h: No such file or directory。这是因为上次的
编译失败,有残留的文件,我们需要清理下,然后重新编译就可以了。
网上的解决办法虽然最后也是可以成功安装好 redis ,但是是有一些隐患的,首先我们要知道redis 需要使用内存分配器的, make MALLOC=jemalloc 就是指定内存分配器为 jemalloc ,make MALLOC=libc 就是指定内存分配器为 libc ,这个是有安全隐患的,jemalloc 内存分配器在实践中处理内存碎片是要比libc 好的,而且在README.md 文档也说明到了,jemalloc内存分配器也是包含在源码包里面的,可以在deps 目录下看到 jemalloc 目录。
Linux安装redis报错:jemalloc/jemalloc.h: No such file or directory踩坑的更多相关文章
- Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令
分区的过程正常: [root@db1 /]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/tr ...
- Linux安装Redis报错`cc:命令未找到`
缺少gcc和gcc-c++的编译环境,安装即可. 可以联网情况下使用命令 yum install gcc yum install gcc-c++ 然后清理原来的残余文件 make distclean ...
- linux安装redis报错
问题:You need tcl 8.5 or newer in order to run the Redis test 解决办法: wget http://downloads.sourceforge. ...
- pip install urllib3[secure] 报错 error: ffi.h: No such file or directory
解决 sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging pyt ...
- window下安装redis报错: creating server tcp listening socket 127.0.0.1:6379: bind No error
window下安装redis报错: creating server tcp listening socket 127.0.0.1:6379: bind No error 解决: 如果没有配置环境,在安 ...
- Windows安装redis报错处理(转!)
要谈则谈,要打便打! ---2019.5.9,贸易战 转自:http://www.yayihouse.com/yayishuwu/chapter/1297 安装redis报错信息 [9204] 15 ...
- centos 在安装YouCompleteMe时提示 Fatal : pyconfig.h No such file or directory
问题:centos 在安装YouCompleteMe时提示 Fatal : pyconfig.h No such file or directory 解决:安装python-devel yum ins ...
- node 报错 env: node\r: No such file or directory
最近在编写一个命令行工具.使用 npm link 时可以正常运行.但是 ctrl+s 保存后, 再运行则报错 env: node\r: No such file or directory ,需要再 n ...
- 使用nsenter进入docker容器后端报错 mesg: ttyname failed: No such file or directory
通过nsenter 进入到docker容器的后端总是报下面的错,, [root@devdtt ~]# docker inspect -f {{.State.Pid}} mynginx411950 [r ...
随机推荐
- 用matlab提取jpg曲线数据或者jpg图片重新复原
I = imread('111.jpg');%读取处理好的图片,必须是严格坐标轴线为边界的图片 I=rgb2gray(I); %灰度变化 I(I>200)=255; %二值化 I(I<=2 ...
- Autofac的基本使用---5、常用配置
Autofac的基本使用---目录 创建实例方法 参考:http://www.cnblogs.com/manglu/p/4115128.html InstancePerDependency 对每一个依 ...
- .NET Core AWS S3云存储
前言 最近有需要用到AWS S3云存储上传附件,这里对利用.NET或.NET Core在调用SDK APi需要注意的一点小问题做个记录,或许能对后续有用到的童鞋提供一点帮助 AWS S3云存储 官方已 ...
- Android自定义ViewGroup-入门
1.效果 2步骤 自定义ViewGroup的步骤是 1.1测量onMeasure /** * 获取子view的个数 * 逐个测量其宽高 得到整个ViewGroup的宽高 * * @param widt ...
- MM-采购模块相关业务
采购模块主要业务流程: 1.收集采购需求(采购申请单),系统采购申请单单据可以由需求部门手工产生,也可以由系统的MRP(物料需求计划)来产生. 2,货源确定,用来确定所申请的物料,通过何种方式向供应商 ...
- windows 10放大125%后字体模糊(已解决)、win10 文字放大之后变模糊 解决办法
windows 10放大125%后字体模糊解决办法 百度搜索 "Windows10_DPI_FIX" 或者用这个地址下载下载地址 https://gallery.technet ...
- Spring Cloud Gateway应用篇(十三)
一.概述 在微服务架构中,每个服务都是一个可以独立开发和运行的组件,而一个完整的微服务架构由一系列独立运行的微服务组成.其中每个服务都只会完成特定领域的功能,比如订单服务提供与订单业务场景有关的功能. ...
- Modbus java slave app
文章实现 Modbus slave app , 用 serial rtu 传输, 代码只实现监听功能(本人测试可行), 要实现写功能,可研究一下代码中 updateProcessImage 方法.完整 ...
- Shell 编程(一)
为什么学习 Shell 编程? 用 shell 来进行服务器的管理或维护 对于大数据程序员来说,需要编写 shell 来管理集群 Shell 是什么? Shell 是一个命令解释器,它为用户提供了 ...
- 使用postman添加cookie失败和cookie消失问题
例如 groupId=2; path=/; domain=.www.baidu.com; HttpOnly; Expires=Tue, 16 Jul 2019 03:42:12 GMT; 添加失败和c ...