前提条件:我从Mac-PC中删除了所有Ruby版本。我还删除了/System/Library/Frameworks/Ruby.framework
文件夹。
之后brew
停止工作(因为它需要Ruby)。所以我决定安装Ruby。但是由于brew
和RVM
依赖于Ruby,我必须从源代码编译Ruby 2.1.2。
./configure
make
sudo make install
我现在得到了什么:
ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
which ruby
/usr/local/bin/ruby
问题:似乎brew
完全崩溃了
brew doctor
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
问题:如何修复brew
?