安装Ruby 报错 Error running 'requirements_osx_brew_update_system ruby-2.3.1

来源:互联网 发布:tomcat数据库密码设置 编辑:程序博客网 时间:2024/06/02 02:25
操作系统: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


0 0
原创粉丝点击