In use brew when,Often you will encounter all kinds of weird errors,Such as updating time often encountered:
1 2 3 |
fatal: git-write-tree: error building trees Cannot save the current index state Error: Failure while executing: git stash save --include-untracked --quiet |
and this:
1 |
Error: Failure while executing: git pull --ff --no-rebase --quiet origin refs/heads/master:refs/remotes/origin/master |
Experiencing these problems,Eighty per cent of your brew directory permissions error。
Use the following command to repair:
1 2 3 |
cd $(brew --prefix) git reset --hard HEAD brew update |
if not,Install the following command to fix it again:
1 2 3 4 5 6 7 |
cd $(brew --prefix) rm Library/Formula/argp-standalone.rb rm Library/Formula/cocot.rb git fetch origin git reset --hard origin/master brew update |
If that does not reload it ...... ...... deleted all the commands I use and repair is successful。
Reference pageHere。
Original article written by LogStudio:R0uter's Blog » Homebrew update 遇到 Error: Failure while executing
Reproduced Please keep the source and description link:https://www.logcg.com/archives/1333.html