在优胜美地安装 Ruby 时出错 [英] Error installing Ruby in Yosemite

查看:49
本文介绍了在优胜美地安装 Ruby 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的 OS X 更新到 10.10,从那时起就面临通过 RVM 安装 ruby​​ 的问题.我无法解决对 gcc46 的依赖.任何帮助表示赞赏.下面是错误堆栈.

I have recently updated my OS X to 10.10 and since then facing issue installing ruby through RVM. There is a dependency on gcc46 which I am unable to resolve. Any help is appreciated. Below is the error stack.

rvm reinstall ruby-1.9.3-p547
ruby-1.9.3-p547 - #removing src/ruby-1.9.3-p547 - please wait
ruby-1.9.3-p547 - #removing rubies/ruby-1.9.3-p547 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-1.9.3-p547.
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: gcc46 - please wait
Error running 'requirements_osx_brew_libs_install gcc46',
showing last 15 lines of /Users/saurabh/.rvm/log/1414321731_ruby-1.9.3-p547/package_install_gcc46.log
+rvm_pretty_print:10> case stdout (stdout)
+rvm_pretty_print:11> [[ -t 1 ]]
+rvm_pretty_print:11> return 1
+rvm_warn:4> printf %b '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://github.com/Homebrew/homebrew/wiki/Installation\n'
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://github.com/Homebrew/homebrew/wiki/Installation
+requirements_osx_brew_libs_install:11> case 10.10 (10.6)
+requirements_osx_brew_libs_install:18> return 1
Requirements installation failed with status: 1.

brew install gcc46                
==> Installing gcc46 from homebrew/homebrew-versions
gcc46: OS X Mavericks or older is required for stable.
Use `brew install devel or --HEAD` for newer.
Error: An unsatisfied requirement failed this build.

我可以使用以下命令进行安装.

I was able to install using below command.

rvm install 1.9.3 --with-gcc=clang

有人能帮我理解上面的命令有什么区别吗?谢谢

Could someone help me understand what's the difference with the above command? Thanks

推荐答案

感谢 @JanStrnádek 的回答.我从左到右解决了所有依赖项并使用以下命令安装了 gcc 并尝试再次安装 ruby​​.成功了.

Thanks @JanStrnádek for the answer. I solved all the dependencies from left to right and installed gcc using the below command and tried installing ruby again. It worked.

brew install homebrew/versions/gcc48

这篇关于在优胜美地安装 Ruby 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆