Ubuntu 20.04 下编译安装 Redis 6.0.6
官方安装文档操作:
https://redis.io/download
1 下载 Redis 源码
$ wget http://download.redis.io/releases/redis-6.0.6.tar.gz

(1) Ubuntu 20.04 下编译安装 Redis 6.0.6-LMLPHP
2 解压
$ tar xzf redis-6.0.6.tar.gz
$ cd redis-6.0.6
3 进入解压目录
$ make
(1) Ubuntu 20.04 下编译安装 Redis 6.0.6-LMLPHP
(1) Ubuntu 20.04 下编译安装 Redis 6.0.6-LMLPHP
4 编译结束
(1) Ubuntu 20.04 下编译安装 Redis 6.0.6-LMLPHP
5 编译出错
如果您的服务器提示编译失败,注意看失败提示,我这里还有一台 Ubuntu Server 20.04 LTS 报错:
查看是缺少GCC编译器
(1) Ubuntu 20.04 下编译安装 Redis 6.0.6-LMLPHP
make 时报如下错误:
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
原因是jemalloc重载了Linux下的ANSI C的malloc和free函数。解决办法:make时添加参数。
make MALLOC=libc
报错提示需要更新版本的 TCL,安装即可
(1) Ubuntu 20.04 下编译安装 Redis 6.0.6-LMLPHP


11-08 09:07
查看更多