Redis安装遇到错误解决方案Error installing redis: redis requires Ruby version >= 2.3.0.

参考源码网站:http://rvm.io/rvm/install

1.安装rvm

可参考:https://blog.csdn.net/qq_30242987/article/details/99727838

2.安装ruby环境

yum install ruby
 yum install rubygems

2.安装redis gem

gem install Redis 

遇到问题:

[root@localhost ~]# gem install redis
Fetching: redis-4.1.2.gem (100%)
ERROR:  Error installing redis:
	redis requires Ruby version >= 2.3.0.

解决方案:先安装rvm,再把ruby版本提升至2.3.0

1.安装curl

yum install curl

2.安装RVM

curl -L get.rvm.io | bash -s stable

3.source /usr/local/rvm/scripts/rvm

4.查看rvm库中已知的ruby版本

rvm list known

5.安装一个ruby版本

 rvm install 2.6.3

6.使用一个ruby版本

rvm use 2.6.3

7.设置默认版本

ruby --version

8.卸载一个已知版本

rvm remove 2.0.0

9.安装redis

[root@localhost ~]# gem install redis
Fetching redis-4.1.2.gem
Successfully installed redis-4.1.2
Parsing documentation for redis-4.1.2
Installing ri documentation for redis-4.1.2
Done installing documentation for redis after 1 seconds
1 gem installed

你可能感兴趣的:(Redis)