码迷,mamicode.com
首页 > 其他好文 > 详细

升级到yosemite后homebrew报错的解决

时间:2014-10-31 06:20:07      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:io   os   ar   sp   on   代码   ad   ef   line   

报错会如下:

/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 23: /usr/local/Library/brew.rb: Undefined error: 0

作者解释如下:

Mac OS X 10.10 (Yosemite) no longer ships with Ruby 1.8 (only 2.0). I have changed the brew.rb file to use the ‘Current’ directory found in the Ruby.Framework folder. Unless there is a specific reason to use 1.8, this should prevent the issue above when doing a OS upgrade.

我还以为重装homebrew或者升级ruby到2.0来解决,然而我没怎么看他们讨论来讨论去的,因为有人直接贴出了一个方法,我测试通过了,分享出来:

cd /usr/local/Library/
git branch –set-upstream-to=origin/master master
# on branch master
git pull

当然了,这个方法是从git里重新拉了一个brew出来,为什么这个方法快呢?你尝试下重新安装brew就知道了,他需要你去clear一些东西,那不如拉源代码回来来得方便

升级到yosemite后homebrew报错的解决

标签:io   os   ar   sp   on   代码   ad   ef   line   

原文地址:http://www.cnblogs.com/walkerwang/p/4064109.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!