ERROR: Error installing rhc:
net-ssh requires Ruby version >= 2.3.
[root@localhost ~]# ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
[root@localhost ~]# curl -L get.rvm.io | bash -s stable # 根据提示配置
root@localhost ~]# curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
gpg: 密钥 39499BDB:公钥“Piotr Kuczynski <piotr.kuczynski@gmail.com>”已导入
gpg: 合计被处理的数量:1
gpg: 已导入:1 (RSA: 1)
[root@localhost ~]# 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 382 0 --:--:-- --:--:-- --:--:-- 383
100 24535 100 24535 0 0 12711 0 0:00:01 0:00:01 --:--:-- 21616
Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
gpg: 于 2021年01月16日 星期六 02时46分22秒 CST 创建的签名,使用 RSA,钥匙号 39499BDB
gpg: 完好的签名,来自于“Piotr Kuczynski <piotr.kuczynski@gmail.com>”
gpg: 警告:这把密钥未经受信任的签名认证!
gpg: 没有证据表明这个签名属于它所声称的持有者。
主钥指纹: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
GPG verified '/usr/local/rvm/archives/rvm-1.29.12.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
[root@localhost ~]# source /etc/profile.d/rvm.sh
[root@localhost ~]# rvm -v
rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
[root@localhost ~]# vi /usr/local/rvm/user/db
# User settings, overrides db settings and persists across installs.
ruby_url=https://cache.ruby-china.org/pub/ruby
[root@localhost ~]# ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
升级检查
[root@localhost ~]# rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.10]
[ruby-]2.3[.8]
[ruby-]2.4[.10]
[ruby-]2.5[.8]
[ruby-]2.6[.6]
[ruby-]2.7[.2]
[ruby-]3[.0.0]
ruby-head
# for forks use: rvm install ruby-head-<name> --url https://github.com/github/ruby.git --branch 2.2
# JRuby
jruby-1.6[.8]
jruby-1.7[.27]
jruby-9.1[.17.0]
jruby[-9.2.14.0]
jruby-head
# Rubinius
rbx-1[.4.3]
rbx-2.3[.0]
rbx-2.4[.1]
rbx-2[.5.8]
rbx-3[.107]
rbx-4[.20]
rbx-5[.0]
rbx-head
# TruffleRuby
truffleruby[-20.3.0]
# Opal
opal
# Minimalistic ruby implementation - ISO 30170:2012
mruby-1.0.0
mruby-1.1.0
mruby-1.2.0
mruby-1.3.0
mruby-1[.4.1]
mruby-2.0.1
mruby-2[.1.1]
mruby[-head]
# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]
# Topaz
topaz
# MagLev
maglev-1.0.0
maglev-1.1[RC1]
maglev[-1.2Alpha4]
maglev-head
# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head
# IronRuby
ironruby[-1.1.3]
ironruby-head
升级
[root@localhost ~]# rvm install 2.4
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/centos/7/x86_64/ruby-2.4.10.tar.bz2
Checking requirements for centos.
Requirements installation successful.
ruby-2.4.10 - #configure
ruby-2.4.10 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16.6M 100 16.6M 0 0 8134k 0 0:00:02 0:00:02 --:--:-- 8136k
ruby-2.4.10 - #validate archive
ruby-2.4.10 - #extract
ruby-2.4.10 - #validate binary
ruby-2.4.10 - #setup
ruby-2.4.10 - #gemset created /usr/local/rvm/gems/ruby-2.4.10@global
ruby-2.4.10 - #importing gemset /usr/local/rvm/gemsets/global.gems..................................
ruby-2.4.10 - #generating global wrappers........
ruby-2.4.10 - #gemset created /usr/local/rvm/gems/ruby-2.4.10
ruby-2.4.10 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.4.10 - #generating default wrappers........
[root@localhost ~]# gem install rhc
Fetching hashie-5.0.0.gem
Fetching archive-tar-minitar-0.8.gem
Fetching highline-1.6.21.gem
Fetching open4-1.3.4.gem
Fetching powerbar-1.0.18.gem
Fetching minitar-0.8.gem
Fetching minitar-cli-0.8.gem
Fetching httpclient-2.6.0.1.gem
Fetching commander-4.2.1.gem
Fetching net-ssh-6.1.0.gem
Fetching net-ssh-gateway-2.0.0.gem
Fetching net-ssh-multi-1.2.1.gem
Fetching net-scp-3.0.0.gem
Fetching rhc-1.38.7.gem
Successfully installed open4-1.3.4
Successfully installed httpclient-2.6.0.1
Successfully installed highline-1.6.21
Successfully installed commander-4.2.1
Successfully installed hashie-5.0.0
Successfully installed powerbar-1.0.18
The `minitar` executable is no longer bundled with `minitar`. If you are
expecting this executable, make sure you also install `minitar-cli`.
Successfully installed minitar-0.8
Successfully installed minitar-cli-0.8
'archive-tar-minitar' has been deprecated; just install 'minitar'.
Successfully installed archive-tar-minitar-0.8
Successfully installed net-ssh-6.1.0
Successfully installed net-ssh-gateway-2.0.0
Successfully installed net-ssh-multi-1.2.1
Successfully installed net-scp-3.0.0
===========================================================================
If this is your first time installing the RHC tools, please run 'rhc setup'
===========================================================================
Successfully installed rhc-1.38.7
Parsing documentation for open4-1.3.4
Installing ri documentation for open4-1.3.4
Parsing documentation for httpclient-2.6.0.1
Installing ri documentation for httpclient-2.6.0.1
Parsing documentation for highline-1.6.21
Installing ri documentation for highline-1.6.21
Parsing documentation for commander-4.2.1
Installing ri documentation for commander-4.2.1
Parsing documentation for hashie-5.0.0
Installing ri documentation for hashie-5.0.0
Parsing documentation for powerbar-1.0.18
Installing ri documentation for powerbar-1.0.18
Parsing documentation for minitar-0.8
Installing ri documentation for minitar-0.8
Parsing documentation for minitar-cli-0.8
Installing ri documentation for minitar-cli-0.8
Parsing documentation for archive-tar-minitar-0.8
Installing ri documentation for archive-tar-minitar-0.8
Parsing documentation for net-ssh-6.1.0
Installing ri documentation for net-ssh-6.1.0
Parsing documentation for net-ssh-gateway-2.0.0
Installing ri documentation for net-ssh-gateway-2.0.0
Parsing documentation for net-ssh-multi-1.2.1
Installing ri documentation for net-ssh-multi-1.2.1
Parsing documentation for net-scp-3.0.0
Installing ri documentation for net-scp-3.0.0
Parsing documentation for rhc-1.38.7
Installing ri documentation for rhc-1.38.7
Done installing documentation for open4, httpclient, highline, commander, hashie, powerbar, minitar, minitar-cli, archive-tar-minitar, net-ssh, net-ssh-gateway, net-ssh-multi, net-scp, rhc after 9 seconds
14 gems installed
查看
[root@localhost ~]# ruby -v
ruby 2.4.10p364 (2020-03-31 revision 67879) [x86_64-linux]