首页 > 代码库 > 升级到yosemite后homebrew报错的解决
升级到yosemite后homebrew报错的解决
报错会如下:
/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 mastergit pull
当然了,这个方法是从git里重新拉了一个brew出来,为什么这个方法快呢?你尝试下重新安装brew就知道了,他需要你去clear一些东西,那不如拉源代码回来来得方便
升级到yosemite后homebrew报错的解决
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。