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
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).
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).
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With