[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
本文来自:[linux]redis编译报错-小码农,转载请保留本条链接,感谢!
温馨提示:
本文最后更新于 2022年04月28日,已超过 937 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我。
正文到此结束
- 本文标签: redis
- 本文链接: https://djc8.cn/archives/linux-redis-compiler-error.html
- 版权声明: 本文由小码农原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权