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 ...
随机推荐
- Spring Cloud 2020.0.0 正式发布,全新颠覆性版本!
Spring Cloud 2020.0.0 没错,Spring Cloud 2020.0.0 正式发布了: 感谢Java技术栈群友通知,想入群的在公众号Java技术栈后台回复:wx,正在使用 Spri ...
- NET 5 Topshelf 或者WorkerServices搭建 Windows/Linux 服务
参考文章https://www.cnblogs.com/RainFate/p/12095793.html Topshelf Topshelf 是一个用来部署基于.NET Framework 开发的服务 ...
- webform中jQuery获取checkboxlist的value值
后台绑定 /首先,在绑定checkboxlist时,为ListItem每个对象添加一个alt属性,值保存对应的value值,代码如下 if(dt != null && dt.Rows. ...
- PHP7.4.3的BUG导致微信公众号CURl上传文件的412错误
https://segmentfault.com/q/1010000021407039 升级PHP就好了 https://segmentfault.com/q/1010000021407039
- Windows 系列GVLK密钥
以下是GVLK密钥版本对照表,可配合KMS服务器进行使用. Windows 系列GVLK密钥 Windows Server 2019 Operating system edition KMS Clie ...
- 手把手教你实现自定义Spring Boot的 Starter
引言 上篇文章<天天用SpringBoot,它的自动装配原理却说不出来>我们有说springBoot的自动装配怎么实现的(建议最好先看下篇文章,因为前后有关系),这篇文章的话我们就自己来实 ...
- ipython快捷键
IPython Notebook有两种不同的键盘输入模式(编辑模式和命令模式). 编辑模式:允许你输入代码或者文本到一个单元格(cell这里我译作单元格)内,并且单元格外面有灰色的选中框(注:Jupy ...
- HTML表格样式
一.表格的表头 1 <html> 2 3 <body> 4 5 <h4>表头:</h4> 6 <table border="1" ...
- 记一次MAVEN依赖事故
笔者昨天遇到的背景是这样的 MAVEN A模块有一个子模块 需要依赖B模块下的一个子模块 我在B项目内通过mvn deploy上传子模块 但之后在A模块引用 怎么引用都不行 提示 org.a ...
- reactor模式前序(二):NIO WEB服务器设计
前文介绍了传统IO的WEB经典服务器 reactor模式前序:传统IO的WEB服务器设计 下面看看JAVA NIO的WEB服务器设计 NIO是基于事件驱动的,对于NIO来说,重要组件是Selector ...