繁体   English   中英

RVM无法在OSX 10.8.5上安装Ruby 1.9.3

[英]RVM fails to install Ruby 1.9.3 on OSX 10.8.5

我正在尝试安装ruby。 沿线的某个地方,我觉得我打破了一些红宝石需求/库。 我不知道我在做什么。 请帮忙。

gcc已安装(以及xcode)

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

rvm似乎已安装

$ rvm -v

rvm 1.25.25 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

端口似乎已安装

$ port version
Version: 2.2.1

尝试安装Ruby失败

$ rvm reinstall 1.9.3

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p545.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 26: /usr/local/Library/brew.rb: Undefined error: 0
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.

因此,我尝试了建议的修复程序,并意识到我的brew安装存在问题

$ brew doctor
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 26: /usr/local/Library/brew.rb: Undefined error: 0

我决定毁掉dafault osx ruby​​安装并决定通过升级到Mavericks来解决此问题。 现在,gcc和rvm版本返回的结果与以前相同,我得到了以下其他结果:

$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
$ port version
-bash: port: command not found

我怀疑您对安装的/ bin目录没有写权限(错误消息); 使用“ sudo rvm reinstall 1.9.3”重试。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM