macos: 安装rvm

一,报错信息:

% sudo gem update --system
Password:
Updating rubygems-update


Fetching rubygems-update-4.0.9.gem
ERROR:  Error installing rubygems-update:
	There are no versions of rubygems-update (= 4.0.9) compatible with your Ruby & RubyGems
	rubygems-update requires Ruby version >= 3.2.0. The current ruby version is 2.6.10.210.
ERROR:  While executing gem ... (NoMethodError)
    undefined method `version' for nil:NilClass

二,查看是否存在rvm

% rvm
zsh: command not found: rvm

三,安装rvm

% 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    350      0 --:--:-- --:--:-- --:--:--   350
100 24655  100 24655    0     0  30281      0 --:--:-- --:--:-- --:--:-- 30281
Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
curl: (28) Failed to connect to github.com port 443 after 30006 ms: Timeout was reached
curl: (28) Failed to connect to github.com port 443 after 30006 ms: Timeout was reached
curl: (28) Failed to connect to github.com port 443 after 30004 ms: Timeout was reached
curl: (16) Error in the HTTP2 framing layer

Could not download 'https://github.com/rvm/rvm/archive/1.29.12.tar.gz'.
  curl returned status '16'.

Downloading https://bitbucket.org/mpapis/rvm/get/1.29.12.tar.gz
Downloading https://bitbucket.org/mpapis/rvm/downloads/1.29.12.tar.gz.asc
Found PGP signature at: 'https://bitbucket.org/mpapis/rvm/downloads/1.29.12.tar.gz.asc',
but no GPG software exists to validate it, skipping.
Installing RVM to /Users/Zhuanz1/.rvm/
    Adding rvm PATH line to /Users/Zhuanz1/.profile /Users/Zhuanz1/.mkshrc /Users/Zhuanz1/.bashrc /Users/Zhuanz1/.zshrc.
    Adding rvm loading line to /Users/Zhuanz1/.profile /Users/Zhuanz1/.bash_profile /Users/Zhuanz1/.zlogin.
Installation of RVM in /Users/Zhuanz1/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/Zhuanz1/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.

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

四,运行rvm

% source ~/.bashrc 
% source ~/.bash_profile 
% rvm -v
rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

 

posted @ 2026-03-29 11:15  刘宏缔的架构森林  阅读(1)  评论(0)    收藏  举报