小码农 猫的一生在打哈欠中度过
[linux]redis编译报错

[linux]redis编译报错

前言

最近需要在一台新机器上安装部署redis,遇到了几个问题,这里记录下。

cc:命令未找到

原因是没有安装gcc,使用命令:yum install gcc -y

zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory

make的时候,加入参数:MALLOC=libc


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

Monotonic clock

赏
支付宝赞赏码
支付宝
微信赞赏码
微信
分享 微博 QQ 空间 豆瓣 Twitter

本文最后更新于 2022 年 04 月 28 日,距今日已 1654 天。

签 redis

本文出自 小码农,转载请注明出处。

评 说

正在取来评说……

卷首