记录: homebrew-core is a shallow clone

2021-07-23 11:00:20 浏览数 (1)

Mac更新完系统后使用homebrew就报错:

代码语言:javascript复制
lideMacBook-Pro:~ li$ brew update
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 command may take a few minutes to run due to the large size of the repository.
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!

解决办法:

代码语言:javascript复制
cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
rm -rf homebrew-cask
brew upgrade

0 人点赞