Redis常见问题

博客介绍了Redis安装和连接过程中常见问题的解决办法。安装时,若输入make命令提示未安装gcc,可使用yum install gcc命令安装;若有其他情况,可将make改为make MALLOC=libc。连接时,若报错Connection refused或NOAUTH,分别对应连接拒绝和需认证密码的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Redis常见问题汇总(持续更新)

1)输入make命令出现

cd src && make all
make[1]: Entering directory `/root/redis-5.0.5/src‘
    CC adlist.o
/bin/sh: cc: command not found
make[1]: *** [adlist.o] Error 127
make[1]: Leaving directory `/root/redis-5.0.5/src‘
make: *** [all] Error 2

未安装gcc,使用命令安装gcc:yum install gcc
2)出现

cd src && make all
make[1]: Entering directory `/root/redis-5.0.5/src‘
    CC adlist.o
In file included from adlist.c:34:
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 `/root/redis-5.0.5/src‘
make: *** [all] Error 2

将make改为make MALLOC=libc
3)Redis连接时报错:Could not connect to Redis at 127.0.0.1:6379: Connection refused
在这里插入图片描述
4)如果出现(error)NOAUTH Authentication required,是由于设置了密码。
在这里插入图片描述

使用>auth 密码
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值