簡體   English   中英

RVM 未在 MAC os Monterey 版本 12.3.1 上安裝任何 Ruby 版本

[英]RVM not installing any Ruby version on MAC os Monterey Version 12.3.1

描述我堅持了兩天。 我無法使用 rvm 安裝任何 ruby 版本。 我嘗試卸載 brew 並重新安裝,但問題仍然存在。 請不要介意我是 ruby on rails 的新手。 謝謝您的幫助。

在這里,我附上了我執行的所有控制台錯誤和步驟。

重現步驟

➜ ~ rvm list known
➜ ~ rvm | head -n 1
Ruby enVironment Manager 1.29.12 (latest) (c) 2009-2020 Michal Papis, Piotr Kuczynski, Wayne E. Seguin
➜ ~ curl -sSL https://get.rvm.io | bash -s stable

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
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc',
but no GPG software exists to validate it, skipping.
Upgrading the RVM installation in /Users/macbookpro/.rvm/
RVM PATH line found in /Users/macbookpro/.mkshrc /Users/macbookpro/.profile /Users/macbookpro/.bashrc /Users/macbookpro/.zshrc.
RVM sourcing line found in /Users/macbookpro/.profile /Users/macbookpro/.bash_profile /Users/macbookpro/.zlogin.
Upgrade of RVM in /Users/macbookpro/.rvm/ is complete.

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

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

➜ ~ rvm install "ruby-2.1.10"
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.3/x86_64/ruby-2.1.10.
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 - please wait
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl - please wait
There were package installation errors, make sure to read the log.

Try brew tap --repair and make sure brew doctor looks reasonable.

Check Homebrew requirements https://docs.brew.sh/Installation
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config coreutils libyaml libksba readline zlib openssl',
please read /Users/macbookpro/.rvm/log/1652608512_ruby-2.1.10/package_install_autoconf_automake_libtool_pkg-config_coreutils_libyaml_libksba_readline_zlib_openssl.log
Requirements installation failed with status: 1.

我已經正確安裝了 brew。 安裝的 RVM 在上面附加了它的版本。 仍然沒有安裝任何 ruby。

預期行為:它應該像 brew 和 rvm 顯示正確的輸出一樣工作。 但是,當我安裝 ruby 時,它就無法正常工作。

➜ ~ rvm info

system:

system:
uname: "Darwin macbooks-MacBook-Pro.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64"
name: "OSX"
version: "12.3"
architecture: "x86_64"
bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)"
zsh: "/bin/zsh => zsh 5.8 (x86_64-apple-darwin21.0)"
remote_path: "osx/12.3/x86_64"
xcode: "13.3.1"

rvm:
version: "1.29.12 (latest)"
updated: "12 minutes 29 seconds ago"
path: "/Users/macbookpro/.rvm"
autolibs: "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

homes:
gem: "not set"
ruby: "not set"

binaries:
ruby: "/usr/bin/ruby"
irb: "/usr/bin/irb"
gem: "/usr/bin/gem"
rake: "/usr/bin/rake"

environment:
PATH: "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/macbookpro/.rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""

我在使用 RBENV 而不是 rvm 安裝舊版 ruby 時遇到了問題。 解決使用

RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC rbenv install 2.5.1

我不知道這種方法是否對 rvm 有用

似乎 RVM 無法安裝舊的 ruby 版本。 我嘗試安裝最新版本更新的 brew 並安裝了它!

Last login: Tue May 17 00:31:59 on ttys000
➜  ~ rvm get master
Downloading https://get.rvm.io
No GPG software exists to validate rvm-installer, skipping.
Downloading https://github.com/rvm/rvm/archive/master.tar.gz
Upgrading the RVM installation in /Users/macbookpro/.rvm/
    RVM PATH line found in /Users/macbookpro/.mkshrc /Users/macbookpro/.profile /Users/macbookpro/.bashrc /Users/macbookpro/.zshrc.
    RVM sourcing line found in /Users/macbookpro/.profile /Users/macbookpro/.bash_profile /Users/macbookpro/.zlogin.
Upgrade of RVM in /Users/macbookpro/.rvm/ is complete.

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

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


RVM reloaded!
➜  ~ rvm install ruby-3.1

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.3/x86_64/ruby-3.1.2.
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 - please wait
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-3.1.2',
please read /Users/macbookpro/.rvm/log/1652730222_ruby-3.1.2/update_system.log
Requirements installation failed with status: 1.
➜  ~ brew update         
Already up-to-date.
➜  ~ rvm install ruby-3.1

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.3/x86_64/ruby-3.1.2.
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 - please wait
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl@1.1 - please wait
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/macbookpro/.rvm/rubies/ruby-3.1.2, this may take a while depending on your cpu(s)...
ruby-3.1.2 - #downloading ruby-3.1.2, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 88 19.6M   88 17.4M    0     0  29061      0  0:11:47  0:10:29  0:01:18     0
curl: (56) LibreSSL SSL_read: Operation timed out, errno 60
There was an error(56).
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/3.1/ruby-3.1.2.tar.gz
** Resuming transfer from byte position 18292049
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2208k  100 2208k    0     0   222k      0  0:00:09  0:00:09 --:--:--  338k
ruby-3.1.2 - #extracting ruby-3.1.2 to /Users/macbookpro/.rvm/src/ruby-3.1.2 - please wait
ruby-3.1.2 - #configuring - please wait
ruby-3.1.2 - #post-configuration - please wait
ruby-3.1.2 - #compiling - please wait
ruby-3.1.2 - #installing - please wait
ruby-3.1.2 - #making binaries executable - please wait
Installed rubygems 3.3.7 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation.
ruby-3.1.2 - #gemset created /Users/macbookpro/.rvm/gems/ruby-3.1.2@global
ruby-3.1.2 - #importing gemset /Users/macbookpro/.rvm/gemsets/global.gems - please wait
ruby-3.1.2 - #generating global wrappers - please wait
ruby-3.1.2 - #gemset created /Users/macbookpro/.rvm/gems/ruby-3.1.2
ruby-3.1.2 - #importing gemsetfile /Users/macbookpro/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-3.1.2 - #generating default wrappers - please wait
ruby-3.1.2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-3.1.2 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri
➜  ~ 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM