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 ...
随机推荐
- EF生成模型时Disigner中无信息
原博文 http://blog.sina.com.cn/s/blog_a1b63a730101ezs4.html 说明 DbContext是对ObjectContext的简化封装.原来的ObjectC ...
- 基于LNMP架构搭建wordpress博客之安装架构说明
架构情况 架构情况:基于LNMP架构搭建wordpress系统 软件包版本说明: 系统要求 : CentOS-6.9-x86_64-bin-DVD1.iso PHP版本 : php-7.2.29 ...
- 手摸手带你学CSS
好好学习,天天向上 本文已收录至我的Github仓库DayDayUP:github.com/RobodLee/DayDayUP,欢迎Star HTML常用标签总结 前言 在大一的时候,上过网页设计的课 ...
- [数据库]000 - 🍳Sysbench 数据库压力测试工具
000 - Sysbench 数据库压力测试工具 sysbench 是一个开源的.模块化的.跨平台的多线程性能测试工具,可以用来进行CPU.内存.磁盘I/O.线程.数据库的性能测试.目前支持的数据库有 ...
- .NET 5 源代码生成器——MediatR——CQRS
在这篇文章中,我们将探索如何使用.NET 5中的新source generator特性,使用MediatR库和CQRS模式自动为系统生成API. 中介者模式 中介模式是在应用程序中解耦模块的一种方式. ...
- 当Thymeleaf遇到向js中传值的操作
在使用Thymeleaf的时候.关于一些点击操作非常头疼.往往需要向JS里面传递各种东西. 然而,在用Thymeleaf的时候.js操作需要拼接语句.但是又不好拼接. 关于一些操作,一般也是在表格中. ...
- centos7中redis安装配置
1.官网下载对应版本,本例以5.0.5为例 2.tar -zxvf xxxxx 并mv到安装目录 3.进入redis-5.0.5目录下,执行编译命令 make 4.编译完成后,经redis安装到指定目 ...
- hashmap简单实现
p.p1 { margin: 0; font: 11px Monaco } p.p2 { margin: 0; font: 11px Monaco; min-height: 15px } p.p3 { ...
- 关于git的一些零碎知识
git文件的三个状态:已修改,已暂存,已提交git的三个区域: 工作区,暂存区,对象库 git的几个指针(以master为例) 远程有个master,本地有个master,本地有个指针是指向远程的ma ...
- Above the Median
http://www.forioi.com/p/3212 农夫约翰把他的N(1<=N<=1e5)奶牛排在一排来衡量他们的高度,牛i有:高度H_I(1<=H_I<=1e9)纳米– ...