解决方法
删除homebrew-core后更新即可
cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade
问题解析
Mac更新完系统后使用homebrew就报错:
Error:
homebrew-core is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
- 使用
brew upgrade后会重新更新homebrew-core
本文介绍了一种解决Mac系统更新后使用Homebrew遇到错误的方法。具体步骤包括删除homebrew-core并重新更新,以解决因浅克隆导致的更新问题。

2041

被折叠的 条评论
为什么被折叠?



