安裝Ruby 報錯 Error running 'requirements_osx_brew_update_system ruby-2.3.1

操作系統:macOS 10.12.1

安裝Ruby2.3.1報錯
具體報錯信息如下:
chaorenbuhuifeideMacBook-Air:~ chaorenbuhuifei$ rvm install 2.3.1
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/osx/10.12/x86_64/ruby-2.3.1.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.3.1',
showing last 15 lines of /Users/chaorenbuhuifei/.rvm/log/1481424365_ruby-2.3.1/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.
Error running 'requirements_osx_brew_update_system ruby-2.3.1'

解決方案:
步驟1:
$ brew install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl sqlite
此方案會報錯
Error: No available formula with the name "apple-gcc42"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
This formula was found in a tap:
homebrew/dupes/apple-gcc42
To install it, run:
brew install homebrew/dupes/apple-gcc42
這就是一波未平一波又起,幸運的報錯提示明確的給出了此問題的解決方案

步驟2:
$brew install homebrew/dupes/apple-gcc42

然後繼續安裝即可
$rvm install 2.3.1


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章