homebrew 报错: homebrew-core is a shallow clone.

2023-01-18 575 0

年末打算更新下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 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!

解决办法如下:

cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
rm -rf homebrew-cask
brew upgrade

相关文章

快速配置反代
复活几万块买的斐讯R1
docker 下操作 mysql
解决服务器安装宝塔面板后, mysql状态页为空, 性能调整无法设置.
macOS 突然无法播放音视频了
安装一个 Rust 版 ServerStatus 云探针