我正在尝试安装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
答案 0 :(得分:0)
我怀疑你没有对安装的/ bin目录的写访问权(错误消息);再次尝试使用&sudo rvm重新安装1.9.3&#39;。