zoukankan      html  css  js  c++  java
  • 升级到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 master
    git pull

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

  • 相关阅读:
    第十周作业
    第九周编程作业与总结
    第八周编程作业及总结
    第七周编程总结
    第五周课程总结&试验报告(三)
    第四周课程总结&试验报告(二)
    第三周学习总结
    Java第二周学习总结
    2019年学习总结
    第十二周作业
  • 原文地址:https://www.cnblogs.com/walkerwang/p/4064109.html
Copyright © 2011-2022 走看看