700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > redis 安装错误 jemalloc.h: No such file or directory

redis 安装错误 jemalloc.h: No such file or directory

时间:2019-04-05 14:14:01

相关推荐

redis 安装错误 jemalloc.h: No such file or directory

为什么80%的码农都做不了架构师?>>>

错误描述

[root@mysql-rtb-slave redis-4.0.1]# make && make installcd src && make allmake[1]: Entering directory `/usr/local/src/redis-4.0.1/src'CC Makefile.depmake[1]: Leaving directory `/usr/local/src/redis-4.0.1/src'make[1]: Entering directory `/usr/local/src/redis-4.0.1/src'CC adlist.oIn file included from adlist.c:34:0:zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory#include <jemalloc/jemalloc.h>^compilation terminated.make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/usr/local/src/redis-4.0.1/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

解决办法

[root@mysql-rtb-slave redis-4.0.1]# make MALLOC=libc[root@mysql-rtb-slave redis-4.0.1]# make && make install

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。