更新brew在Mac上的10.11.6

时间:2016-08-26 00:29:55

标签: homebrew

我尝试update brew并收到以下消息:

/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>'
DrewJocham:/ DrewJocham$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
The current contents of /usr/local are bin Cellar CODEOFCONDUCT.md CONTRIBUTING.md etc identiv include join_air_data lib libexec Library LICENSE.txt mysql mysql-5.6.22-osx10.8-x86_64 opt pcsc README.md share SUPPORTERS.md .git .gitignore
DrewJocham:/ DrewJocham$ brew doctor
/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>'

我试图删除Ruby和许多其他东西,但似乎都没有。

现在我读了控制台并运行了:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

之后我跑了:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

让我跑: sudo xcodebuild -license

我接受了

现在brew仍然无效。当我运行brew update时,我收到以下错误:

-bash: /usr/local/bin/brew: No such file or directory

----------------更新1 -------------------

卸载并尝试重新安装后,请说Homebrew is already installed try to remove it first if you want to reinstall it

当我卸载它时,未删除以下文件:

==&GT; Homebrew卸载了! 以下可能的Homebrew文件未被删除:

/usr/local/.git/
/usr/local/.github/
/usr/local/bin/
/usr/local/Cellar/
/usr/local/etc/
/usr/local/Frameworks/
/usr/local/include/
/usr/local/join_air_data/
/usr/local/lib/
/usr/local/Library/
/usr/local/man/
/usr/local/mysql -> /usr/local/mysql-5.6.23-osx10.8-x86_64
/usr/local/mysql-5.6.15-osx10.7-x86_64/
/usr/local/mysql-5.6.23-osx10.8-x86_64/
/usr/local/opt/
/usr/local/share/
/usr/local/var/

现在我做了chmod 775 /user/local/甚至chmod 777 /user/local/并试图卸载它们,但在运行时仍然遇到上述错误:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

我跑的时候: mdfind -name brew | grep \/brew$我得到以下输出:

/usr/local/etc/bash_completion.d/brew

0 个答案:

没有答案