redis requires Ruby version >= 2.3.0.

最近在研究redis的集群,redis官方提供了redis-trib.rb工具,但是在使用之前 需要安装ruby,以及redis和ruby连接:

yum -y install ruby ruby-devel rubygems rpm-build

gem install redis

其中 gem install redis命令执行时出现了:

Fetching: redis-4.1.2.gem (100%)
ERROR:  Error installing redis:
	redis requires Ruby version >= 2.3.0.

查了资料发现是Centos默认支持ruby到2.0.0,可gem 安装redis需要最低是2.3.0

解决办法是 先安装rvm,再把ruby版本提升至2.3.0

1.安装curl

yum install curl

2. 安装RVM

curl -L get.rvm.io | bash -s stable  #看报错提示Downloading https://github.com/rvm/rvm/archive/1.29.8.tar.gz

Downloading https://github.com/rvm/rvm/releases/download/1.29.8/1.29.8.tar.gz.asc
gpg: Signature made Wed 08 May 2019 10:14:49 PM CST using RSA key ID 39499BDB
gpg: Can‘t check signature: No public key
GPG signature verification failed for ‘/usr/local/rvm/archives/rvm-1.29.8.tgz‘ - ‘https://github.com/rvm/rvm/releases/download/1.29.8/1.29.8.tar.gz.asc‘! Try to install GPG v2 and then fetch the public key:

    gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
    command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -

  

[[email protected] ~]# curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
gpg: keyring `/root/.gnupg/secring.gpg‘ created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
gpg: no ultimately trusted keys found
[[email protected] ~]# curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
gpg: key 39499BDB: public key "Piotr Kuczynski <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
[[email protected] ~]# curl -L get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    277      0 --:--:-- --:--:-- --:--:--   277
100 24168  100 24168    0     0   6932      0  0:00:03  0:00:03 --:--:-- 16690
Downloading https://github.com/rvm/rvm/archive/1.29.8.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.8/1.29.8.tar.gz.asc
gpg: Signature made Wed 08 May 2019 10:14:49 PM CST using RSA key ID 39499BDB
gpg: Good signature from "Piotr Kuczynski <[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
GPG verified ‘/usr/local/rvm/archives/rvm-1.29.8.tgz‘
Creating group ‘rvm‘
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete:

  * First you need to add all users that will be using rvm to ‘rvm‘ group,
    and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.

  * To start using RVM you need to run `source /etc/profile.d/rvm.sh`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
  * Please do NOT forget to add your users to the rvm group.
     The installer no longer auto-adds root or users to the rvm group. Admins must do this.
     Also, please note that group memberships are ONLY evaluated at login time.
     This means that users must log out then back in before group membership takes effect!
Thanks for installing RVM ??
Please consider donating to our open collective to help us maintain RVM.

??  Donate: https://opencollective.com/rvm/donate

  

[[email protected] ~]# find / -name rvm.sh
/etc/profile.d/rvm.sh
[[email protected] ~]#  source /etc/profile.d/rvm.sh
[[email protected] ~]# rvm requirements
[[email protected] ~]# rvmsudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel

  

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

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

rvm list known

5. 安装一个ruby版本

rvm install 2.3.3

6. 使用一个ruby版本

rvm use 2.3.3

7. 设置默认版本

rvm remove 2.0.0

8. 卸载一个已知版本

ruby --version

9. 再安装redis就可以了

gem install redis

原文地址:https://www.cnblogs.com/Camiluo/p/10996934.html

时间: 2024-11-13 06:45:22

redis requires Ruby version >= 2.3.0.的相关文章

redis requires ruby version 2.2.2的解决方案

redis requires ruby version 2.2.2的解决方案 今天在做Redis的Cluster集群的时候,在执行gem install redis时,提示如下错误: gem install redis ERROR: Error installing redis: redis requires Ruby version >= 2.2.2. CentOS7 yum库中ruby的版本支持到 2.0.0,可gem 安装redis需要最低是2.2.2,采用rvm来更新ruby: 1.安装

redis requires Ruby version &gt;= 2.2.2问题

一.说明: 搭建Redis集群时,安装 gem install redis 报错: redis requires Ruby version >= 2.2.2的报错,查了资料发现是Centos默认支持ruby到2.0.0,可gem 安装redis需要最低是2.2.2 二.解决办法: 解决办法是 先安装rvm,再把ruby版本提升至2.3.3 1.安装curl sudo yum install curl 2. 安装RVM curl -L get.rvm.io | bash -s stable 报错:

部署老系统出现的问题Gem::InstallError: net-ssh requires Ruby version &gt;= 2.0

Gem::InstallError: net-ssh requires Ruby version >= 2.0 修改Gemfile,变一下版本 gem 'unicorn' group :test, :development do gem "rspec-rails", ">= 2.5.0" gem 'factory_girl', '2.6.4' gem 'factory_girl_rails', '1.7.0' gem 'faker', '1.1.2' g

cocoapods的安装 遇到 Error installing pods:activesupport requires Ruby version &gt;=2.2.2

1.打开终端 2 移除现有 Ruby 默认源 输入以下指令 $gem sources --remove https://rubygems.org/ 3.使用新的源 输入以下指令 $gem sources -a https://ruby.taobao.org/ 4.验证新源是否替换成功 输入以下指令 $gem sources -l 5.安装 CocoaPods $sudo gem install cocoa pods //–––––––––––那么问题来了——没遇到的自动跳过———————————

iOS的CocoaPods(activesupport requires Ruby version &gt;= 2.2.2)

如果你在安装遇到这个问题 activesupport requires Ruby version >= 2.2.2,那么这里可以帮助你(lasted version) 如果你是通过 http://www.cnblogs.com/pruple/p/5345084.html 安装的,在安装cocoapods遇到这个错,是因为ruby版本太低原因 ruby -v可查看当前版本,目前最新2.3.0,安装2.2.2版本及以上版本就可 1.关于更新ruby链接:http://blog.csdn.net/li

安卓安装提示:Android SDK requires Android Developer Toolkit version 21.1.0 or above. (错误解决方法)

安卓安装提示:Android SDK requires Android Developer Toolkit version 21.1.0 or above.  (错误解决方法) 主要是由于版本不对,sdk和adt的版本. 解决思路: 打开Eclipse--帮助(help) -- Install Now Software -- Add按钮 Name:随便输入 下面的文本框输入 :http://dl-ssl.google.com/android/eclipse/ 在线更新就行了,超慢呀! =====

/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in `git_version&#39;: Failed to extract git version from `git --version`

问题及分析 今天做项目的时候,执行pod update报了如下错误信息: /usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in git_version': Failed to extract git version fromgit --version("xcrun: error: active developer path (\"/Users/feiwei/Desktop/

how to change the original ruby version in Rails app

The ruby version what I used need lower,changed, run $rvm use |rubyVersion| --default $cd |project| $bundle install finally, the ruby version what you use is changed.

未能加载文件或程序集“Newtonsoft.Json, Version=4.5.0.0[已解决]

在使用百度UEditor,不小心将Newtonsoft.Json,升级了,然后就报的一个错,说: 其他信息: 未能加载文件或程序集“Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed”或它的某一个依赖项.找到的程序集清单定义与程序集引用不匹配. (异常来自 HRESULT:0x80131040),各种清理解决方案都不行 ,后来在网站找到了一个方法 ,说插入以下代码就可以了: <run