==> Fetching /usr/local/Homebrew...
error: cannot open .git/FETCH_HEAD: Permission denied
error: Unable to create '/usr/local/Homebrew/.git/refs/remotes/origin/HEAD.lock': Permission denied
error: Could not setup refs/remotes/origin/HEAD

==> Resetting /usr/local/Homebrew...
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied

==> Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
error: cannot open .git/FETCH_HEAD: Permission denied
error: Unable to create '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/refs/remotes/origin/HEAD.lock': Permission denied
error: Could not setup refs/remotes/origin/HEAD

==> Resetting /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
fatal: Unable to create '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock': Permission denied

解决方式

sudo chown -R $(whoami) $(brew --prefix)/*
最后修改:2021 年 01 月 21 日 10 : 51 AM
如果觉得我的文章对你有用,请随意赞赏