欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Redis安装redis-cell踩坑

程序员文章站 2022-05-27 14:41:12
...

在redis安装redis-cell后出现错误

Redis安装redis-cell踩坑
Redis安装redis-cell踩坑

把启动日志打印到redis.log中

10066:C 22 Mar 2021 21:01:45.320 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10066:C 22 Mar 2021 21:01:45.320 # Redis version=6.2.1, bits=64, commit=00000000, modified=0, pid=10066, just started
10066:C 22 Mar 2021 21:01:45.321 # Configuration loaded
10066:M 22 Mar 2021 21:01:45.324 * Increased maximum number of open files to 10032 (it was originally set to 1024).
10066:M 22 Mar 2021 21:01:45.324 * monotonic clock: POSIX clock_gettime
10066:M 22 Mar 2021 21:01:45.327 * Running mode=standalone, port=6379.
10066:M 22 Mar 2021 21:01:45.327 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
10066:M 22 Mar 2021 21:01:45.327 # Server initialized
10066:M 22 Mar 2021 21:01:45.327 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
10066:M 22 Mar 2021 21:01:45.330 * Module 'bf' loaded from /root/redis-6.2.1/RedisBloom/redisbloom.so
10066:M 22 Mar 2021 21:01:45.338 # Module /root/redis-6.2.1/redis-cell/libredis_cell.so failed to load: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /root/redis-6.2.1/redis-cell/libredis_cell.so)
10066:M 22 Mar 2021 21:01:45.338 # Can't load module from /root/redis-6.2.1/redis-cell/libredis_cell.so: server aborting
"redis.log" 49L, 4925C

发现缺少GLIBC_2.18

解决办法

// 下载 glibc 压缩包
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz 
// 解压 glibc 压缩包
tar -zxvf glibc-2.18.tar.gz
// 进入解压后的目录
cd glibc-2.18
// 创建编译目录
mkdir build
// 进入到创建好的目录
cd build/
// 编译、安装
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

make -j 8
make install

重新启动redis,问题解决了