redis 安装错误 jemalloc.h: No such file or directory
生活随笔
收集整理的這篇文章主要介紹了
redis 安装错误 jemalloc.h: No such file or directory
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
為什么80%的碼農都做不了架構師?>>> ??
?
錯誤描述
[root@mysql-rtb-slave redis-4.0.1]# make && make install cd src && make all make[1]: Entering directory `/usr/local/src/redis-4.0.1/src'CC Makefile.dep make[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.o In 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 1 make[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?
轉載于:https://my.oschina.net/AnnaWu/blog/1608037
總結
以上是生活随笔為你收集整理的redis 安装错误 jemalloc.h: No such file or directory的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C++获取本机的ip地址程序
- 下一篇: Java编程思想 学习笔记1