macOS Catalina中RVM的更新,以及Ruby的更新

2 篇文章 0 订阅

该文为macOS Catalina 10.15.1中安装Python3 完全安装攻略的衍生小文章。

官网文档:

Upgrading RVM RVM supports few ways of upgrading itself. Every month
or two a stable release of RVM is created, it includes minor version
increase.

每一到两个月都会有一个正式的稳定版。

To upgrade to the most stable version
升级到最新的稳定版本(译)

$ rvm get stable

正常情况下的升级,这一句代码就足够了。但是如果有意外情况,官方文档也给出了详细步骤。

Is rvm get stable not working?
Is rvm get latest telling you
“You already have the latest version!” , but you know you don’t?
Try this:
rvm升级到稳定版没效果?
rvm最新版本告诉你“你已经是最新版本了”,但是你知道并不是?
那么试试下面的命令

$ rvm get head
$ rvm reload
$ rvm get stable

If that does not work for you, you can always use the installer to
update:
如果这样任然没有效果,你随时可以使用安装程序来进行升级

$ \curl -sSL https://get.rvm.io | bash -s stable
$ rvm reload

因为用的代码引用,所以//后面的被注释了,直接复制整行命令就好

Upgrading to the latest repository source version (the most bugfixes)
升级到最新源码版本(修复最多bug的版本)

$ rvm get head

开始更新Ruby

1、查看Ruby版本

$ rvm list known
#列出已知的ruby版本  
Warning, new version of rvm available '1.29.9-next', you are using older version '1.26.11'.
问题:

发现rvm版本也需要更新

2、更新rvm

$ rvm get stable
Downloading https://get.rvm.io
No GPG software exists to validate rvm-installer, skipping.
Downloading https://github.com/rvm/rvm/archive/1.29.9.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc',
but no GPG software exists to validate it, skipping.
Upgrading the RVM installation in /Users/xiatian/.rvm/
    RVM PATH line found in /Users/xiatian/.mkshrc /Users/xiatian/.profile /Users/xiatian/.bashrc /Users/xiatian/.zshrc.
    RVM sourcing line found in /Users/xiatian/.profile /Users/xiatian/.bash_profile /Users/xiatian/.zlogin.
Upgrade of RVM in /Users/xiatian/.rvm/ is complete.
  * RVM 1.30 simplifies behavior of 'rvm wrapper' subcommand


Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.

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


RVM reloaded!

3、安装Ruby最新版本2.6.5

$ rvm install ruby-2.6.5
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.15/x86_64/ruby-2.6.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system...........Failed to update Homebrew, follow instructions at

    https://docs.brew.sh/Common-Issues

and make sure `brew update` works before continuing.
.
Error running 'requirements_osx_brew_update_system ruby-2.6.5',
please read /Users/xiatian/.rvm/log/1574165496_ruby-2.6.5/update_system.log
Requirements installation failed with status: 1.

再次运行:
$ brew install ruby
Updating Homebrew...
Error: readline: undefined method `undent' for #<String:0x00007fd7d955c130>
解决

先运行下面命令

$ rvm autolibs read-only

再安装:

$ rvm install ruby-2.6.5
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.15/x86_64/ruby-2.6.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Missing required packages: coreutils readline zlib openssl@1.1
Somehow it happened there is no executable 'openssl',
run 'brew doctor' and make sure latest 'openssl@1.1' is installed properly.
Requirements installation successful.

查看版本:

$ ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]

安装成功。

参考文章:
Mac——RVM的更新,以及Ruby的更新

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fswy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值