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 ...
随机推荐
- MySQL、DM 行转列及字段去重(Group_Concat())
最近在使用数据库迁移适配,由MySQL 库迁移到达梦数据库,其中进行行转列时,MySQL转换达梦sql语法有些问题,特记录. 在MySQL 下有Group_Concat(expr) ,在达梦及神通数 ...
- STM32F103的CAN结构体学习
使用STM32F103的CAN通信就是用这4个结构体函数,把他们理解透了,CAN就好用了 CAN的结构体定义在stm32f10x_can.h里面 /************************** ...
- Android面试系列一
什么是ANR,如何避免它 ANR是应用程序无响应(Application Not Responding)的的英文缩写: 当Android 手机在一段时间响应不够灵敏,系统会向用户展示一个对话框 ...
- MySQL中的模糊查询 like 和 Oracle中的 instr() 函数有同样的查询效果
注:MySQL中的模糊查询 like 和 Oracle中的 instr() 函数有同样的查询效果: 如下所示: MySQL: select * from tableName where name li ...
- Kafka 消费组消费者分配策略
body { margin: 0 auto; font: 13px / 1 Helvetica, Arial, sans-serif; color: rgba(68, 68, 68, 1); padd ...
- mysql组合索引之最左原则
为什么在单列索引的基础上还需要组合索引? select product_id from orders where order_id in (123, 312, 223, 132, 224); 我们当然 ...
- 基于http的netty demo
1.引入netty的pom <dependency> <groupId>io.netty</groupId> <artifactId>netty-all ...
- 线程上下文类加载器(Context ClassLoader)
1.线程上下文类加载器是从jdk1.2开始引入的,类Thread中的getContextClassLoader()与setContextClassLoader(ClassLoader c1),分别用来 ...
- ASP.NET Core路由中间件[1]: 终结点与URL的映射
目录 一.路由注册 二.设置内联约束 三.默认路由参数 四.特殊的路由参数 借助路由系统提供的请求URL模式与对应终结点(Endpoint)之间的映射关系,我们可以将具有相同URL模式的请求分发给应用 ...
- Logstash学习之路(二)Elasticsearch导入json数据文件
一.数据从文件导入elasticsearch 1.数据准备: 1.数据文件:test.json 2.索引名称:index 3.数据类型:doc 4.批量操作API:bulk {"index& ...