Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法

错误描述

安装Redis 2.8.18时报错:

zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory `/data0/src/redis-2.6.2/src‘
make: *** [all] Error 2

原因分析

在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 出错。 所以加这么一个参数。

解决办法

make MALLOC=libc

make PREFIX=/opt/redis MALLOC=libc install

时间: 2024-10-22 14:30:02

Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法的相关文章

Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory

Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API. 本文为大家讲解的是Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法,感兴趣的同学参考下. 错误描述 安装Redis 2.8.18时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or

Oracle 安装报错 [INS-06101] IP address of localhost could not be determined 解决方法

出现这种错误是因为主机名和/etc/hosts 文件不一致,只需要把主机名和其IP 写入/etc/hosts 文件,就ok了. 注意名字不能有下划线 修改network 文件之外,再使用hostname 命令指定一下主机名,就不用重启OS了. 1.     修改/etc/sysconfig/network 文件 [[email protected]~]# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=s

Ubuntu下 fatal error: Python.h: No such file or directory 解决方法

参考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such file or directory 解决方法 根据使用的Python版本安装python-dev库. sudo apt-get install python-dev # for python2.x installs sudo apt-get install python3-dev # for python3.x i

Redis 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法

错误描述 安装Redis 2.8.18时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2: error: #error "Newer version of jemalloc required" make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/data0/src/redis-2.6.2/

Redis 2.8.18 安装报错

zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2: error: #error "Newer version of jemalloc required" make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/data0/src/redis-2.6.2/src' make: *** [all] Err

yum安装报错error: unpacking of archive failed on file /usr/bin/xxxx: cpio: open Failed

Bash漏洞爆出来了,赶紧更新一下补丁,#yum -y update bash 报错了 error: unpacking of archive failed on file /usr/bin/bashbug-64;54254708: cpio: open 参考了网上资料,原来是以前加固时给/usr/bin加了i权限 # lsattr /usr | grep bin ----i-----I-- /usr/bin # chattr -i /usr/bin 然后yum安装就OK了 参考资料:http:

Oracle 安装报错 [INS-06101] IP address of localhost could not be determined 解决方法输入日志标题

安装Oracle 11gR2,报错:[INS-06101] IP address of localhost could not be determined 出现这种错误是因为主机名和/etc/hosts 文件不一致,只需要把主机名和其IP 写入/etc/hosts 文件,就ok了. 查看主机名和和ip 地址关系: [[email protected]~]# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=

cocoapods 安装报错 ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/xcodeproj

cocoapods 安装报错 ERROR:  While executing gem ... (Errno::EPERM)     Operation not permitted - /usr/bin/xcodeproj 执行下面语句安装即可: sudo gem install -n /usr/local/bin cocoapods

cnmp安装失败,报错npm ERR! enoent ENOENT: no such file or directory,

1.cnmp安装失败 2.提示如下: bogon:node_modules liangjingming$ sudo npm install cnpm -g --registry=https://registry.npm.taobao.org Password: /usr/local/lib └── (empty) npm ERR! Darwin 16.4.0 npm ERR! argv "/usr/local/Cellar/node/7.8.0/bin/node" "/usr