Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating Brew error on Mac OS X

Tags:

homebrew

I am trying to update brew on my Mac OS X machine so I can update php. However, when trying to run brew install, I get this error:

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 doctor:

Warning: Broken symlinks were found. Remove them with brew prune: /usr/local/bin/wget /usr/local/share/man/man1/wget.1 /usr/local/Library/LinkedKegs/wget

like image 287
user1072337 Avatar asked Aug 19 '15 21:08

user1072337


People also ask

What does brew update reset do?

The update-reset version of this command resets all formulae to be identical to the contents of their remote repositories, deleting any local changes. It is only used as a last-resort effort to fix a problem (it's like unplugging Homebrew and plugging it back in).

Where is brew installed on Mac?

On Mac Intel machines, that's all you need to do; Homebrew is ready to use. On Mac Intel, Homebrew installs itself into the /usr/local/bin directory, which is already configured for access by the shell with the macOS default $PATH environment variable (the default is set by the /usr/libexec/path_helper command).


1 Answers

Check the solution here https://github.com/Homebrew/homebrew/issues/21002

in Short

cd /usr/local
git status
git reset --hard origin/master
git clean -df
like image 151
kirhgoff Avatar answered Nov 14 '22 01:11

kirhgoff