在Mac OS X上更新Brew错误

时间:2015-08-19 21:41:05

标签: homebrew

我正在尝试在我的Mac OS X机器上更新brew,以便我可以更新php。但是,在尝试运行brew install时,我收到此错误:

error: The following untracked working tree files would be overwritten by merge:
    Library/Homebrew/extend/enumerable.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull --quiet origin refs/heads/master:refs/remotes/origin/master
酿造医生:

警告:找到了破损的符号链接。使用brew prune删除它们:   在/ usr / local / bin目录/ wget的   /usr/local/share/man/man1/wget.1   的/ usr /本地/库/ LinkedKegs / wget的

3 个答案:

答案 0 :(得分:24)

在此检查解决方案 https://github.com/Homebrew/homebrew/issues/21002

简短

cd /usr/local
git status
git reset --hard origin/master
git clean -df

答案 1 :(得分:6)

输入brew doctor并执行它告诉您的操作。

答案 2 :(得分:0)

brew install不是您想要的。我相信如果你这样做

brew update
brew upgrade

你应该好。如果您想了解更多信息,请查看https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#faq