Loading... ```bash ==> 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 ``` 解决方式 ```bash sudo chown -R $(whoami) $(brew --prefix)/* ``` 最后修改:2021 年 01 月 21 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏