2017-04-18 83 views
2

我無法安裝Ruby 2.4.0。如何在Mac OS上使用RVM安裝Ruby 2.4.0

  • RVM版本是1.29.1
  • RubyGems的版本是2.6.11

我試圖使用安裝Ruby 2.4.0:

rvm install ruby-2.4.0 

我越來越出現以下錯誤:

Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.11/x86_64/ruby-2.4.0. 
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. 
Checking requirements for osx_brew. 
Installing requirements for osx_brew. 
Updating system........... 
Error running 'requirements_osx_brew_update_system ruby-2.4.0', 
showing last 15 lines of /Users/bbc-admin/.rvm/log/1492510247_ruby-2.4.0/update_system.log 
    https://github.com/Homebrew/homebrew/wiki/Common-Issues 
and make sure `brew update` works before continuing.' 
++ rvm_pretty_print stderr 
++ case "${rvm_pretty_print_flag:=auto}" in 
++ case "${TERM:-dumb}" in 
++ case "$1" in 
++ [[ -t 2 ]] 
++ return 1 
++ printf %b 'Failed to update Homebrew, follow instructions here: 
    https://github.com/Homebrew/homebrew/wiki/Common-Issues 
and make sure `brew update` works before continuing.\n' 
Failed to update Homebrew, follow instructions here: 
    https://github.com/Homebrew/homebrew/wiki/Common-Issues 
and make sure `brew update` works before continuing. 
++ return 1 
Requirements installation failed with status: 1. 

回答

5

認爲你可能需要更新自制軟件;請嘗試brew update,然後重試rvm install ruby-2.4.0命令。

我會添加這個作爲評論,但沒有足夠的代表。讓我知道你是怎麼辦的。

+0

試過這個..得到這個錯誤: '錯誤:您當地的下列文件中的更改將被合併覆蓋: \t庫/公式/ libimobiledevice.rb 請提交更改,或者您之前他們藏可以合併。 正在中止 錯誤:執行失敗:git pull -q origin refs/heads/master:refs/remotes/origin/master' –

+0

檢查此[link](https://github.com/Homebrew/legacy-homebrew/issues/11448)。它可能會解決你的問題。 –

+0

根據你的錯誤,你需要運行'git stash',然後'brew update'以便不會覆蓋任何文件。 –

相關問題