简体   繁体   中英

brew update: Error in terminal mac

error: Your local changes to the following files would be overwritten by merge:
    Library/Contributions/brew_bash_completion.sh
    Library/Contributions/brew_fish_completion.fish
    Library/Contributions/brew_zsh_completion.zsh
    Library/Contributions/manpages/brew.1.md
        ...

    Library/Formula/dmtx-utils.rb
    Library/Formula/docbook-xsl.rb
    Library/Formula/dromeaudio.rb
    Library/Formula/dub.rb
    Library/Formula/dvorak7min.rb
    Library/Formula/dyld-headers.rb
    Library/Formula/dylibbundler.rb
    Library/For
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

I've seen this a few times and don't know what causes it; but if you're sure you haven't made any modifications to those files that you want to save, you can go into /usr/local (or wherever you keep the Homebrew installation) and type git reset --hard HEAD . Then try updating again.

删除文件并重新安装HOMEBREW解决了该问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM