homebrew - 报错处理

作者: 7c03aed0f01f | 来源:发表于2017-02-24 17:03 被阅读20次

    无法更新

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/Library/brew.rb:15:in `<main>'
    

    解决1

    $ sudo chown -R $(whoami):admin /usr/local
    

    解决2

    open terminal
    $ cd /usr/local
    $ git reset --hard
    $ git clean -df
    $ brew update

    相关文章

      网友评论

        本文标题:homebrew - 报错处理

        本文链接:https://www.haomeiwen.com/subject/ozmwwttx.html