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 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

Redis采用不同内存分配器tcmalloc和jemalloc和glibc碎片率对比

时间: 2024-08-02 02:47:37

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 2.8.18时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/data0/src/redis-2.6.2/src

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:

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

TP连接数据库报错:SQLSTATE[HY000] [2002] No such file or directory

连接数据库报错:“SQLSTATE[HY000] [2002] No such file or directory”. 出现这个问题的原因是PDO无法找到mysql.sock或者mysqld.sock.  解决方法1:找到相应的.sock文件,并设置php.ini文件中的pdo_mysql.default_socket的值为.sock文件的路径. pdo_mysql.default_socket= /tmp/mysqld.sock 然后重启Apache,或者nginx下重启php-fpm即可.

error: readline/readline.h: No such file or directory

报如下错: [[email protected] rpy2-2.8.5]# python setup.py install R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" /usr/lib64/R/bin/R CMD config --ldflags /usr/lib64/R/bin/R CMD config --cppflags Compilation parameters for rpy2's C components

出错mlogc.c:32:23: error: curl/curl.h: No such file or directory

出现下列错误: mlogc.c:32:23: error: curl/curl.h: No such file or directory mlogc.c:1091: error: expected ')' before '*' token mlogc.c: In function 'logc_init': 出错原因:缺少libcurl-dev or libcurl-devel centOS上安装依赖包: yum install libcurl-dev libcurl-devel 出错mlogc.

fatal error: openssl/sha.h: No such file or directory 解决方案

出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, header files and manpages,他是openssl的一部分,而openssl对ssl进行了实现- 解决方案: 使用sudo apt-get install libssl-dev来安装libssl-dev即可