簡體   English   中英

無法在 macOS Monterey 12.3.1 Intel core i5 上安裝 rbenv

[英]Failed to install rbenv on macOS Monterey 12.3.1 Intel core i5

我嘗試使用正常安裝(rbenv install 2.7.6)或使用 RUBY_CFLAGS 進行安裝,但仍然沒有運氣!

rbenv --version
rbenv 1.2.0

,

gem which cocoapods
/Users/mymac/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods.rb

,

Xcode 13.4

,

mymac@MacBook-Pro% RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.7.6
    Downloading ruby-2.7.6.tar.bz2...
    -> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.bz2
    Installing ruby-2.7.6...
    ruby-build: using readline from homebrew
    
    BUILD FAILED (macOS 12.3.1 using ruby-build 20220426)
    
    Inspect or clean up the working tree at /var/folders/n5/d88l_sl9071gns5xdqk_myww0000gn/T/ruby-build.20220528201149.40536.2UiW6F
    Results logged to /var/folders/n5/d88l_sl9071gns5xdqk_myww0000gn/T/ruby-build.20220528201149.40536.log
    
    Last 10 log lines:
        from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem'
        from ./tool/rbinstall.rb:279:in `open_for_install'
        from ./tool/rbinstall.rb:845:in `block in install_default_gem'
        from ./tool/rbinstall.rb:835:in `each'
        from ./tool/rbinstall.rb:835:in `install_default_gem'
        from ./tool/rbinstall.rb:799:in `block in <main>'
        from ./tool/rbinstall.rb:950:in `block in <main>'
        from ./tool/rbinstall.rb:947:in `each'
        from ./tool/rbinstall.rb:947:in `<main>'
    make: *** [do-install-all] Error 1

請任何人幫助。 謝謝你。

錯誤說您正在嘗試降級環境。

查看

ruby -v

將其升級到最新版本

rbenv install 3.1.2 # or whichever is latest

看到這個https://gorails.com/setup/osx/12-monterey

跟着它

rbenv global 3.1.2
eval "$(rbenv init -)"
gem update --system

暫無
暫無

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

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