mac 安装 redis 出现 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) 解决

mac 安装redis时候
报xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) 的错

此时是因为mac没有安装xcode

运行

$ xcode-select --install 
xcode-select: note: install requested for command line developer tools

即可安装

然后

sudo  mv redis-7.2.4 /usr/local/
cd /usr/local/redis-7.2.4/
 sudo make test
sudo make install

即可安装redis

接着启动redis

 redis-server
52014:C 19 Mar 2024 20:00:48.785 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
52014:C 19 Mar 2024 20:00:48.785 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=52014, just started
52014:C 19 Mar 2024 20:00:48.785 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
52014:M 19 Mar 2024 20:00:48.788 * Increased maximum number of open files to 10032 (it was originally set to 2560).
52014:M 19 Mar 2024 20:00:48.788 * monotonic clock: POSIX clock_gettime
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 7.2.4 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                  
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 52014
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           https://redis.io       
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

52014:M 19 Mar 2024 20:00:48.789 # WARNING: The TCP backlog setting of 511 cannot be enforced because kern.ipc.somaxconn is set to the lower value of 128.
52014:M 19 Mar 2024 20:00:48.789 * Server initialized
52014:M 19 Mar 2024 20:00:48.790 * Ready to accept connections tcp

运行redis-cli

redis-cli -h 127.0.0.1 -p 6379
127.0.0.1:6379> PING
PONG
127.0.0.1:6379> 
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值