homebrew-core is a shallow clone

Mac 升级 11.0.1 后,brew 更新软件出现:

jason@Jason ~ % brew upgrade php74
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. 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!
jason@Jason ~ %

根据提示执行,无响应

git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow

尝试将命令中指定的目录删除,再执行

jason@Jason ~ % rm -rf /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
jason@Jason ~ % git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow
jason@Jason ~ % git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" fetch --unshallow
remote: Enumerating objects: 58078, done.
remote: Counting objects: 100% (56436/56436), done.
remote: Compressing objects: 100% (18251/18251), done.
Receiving objects: 100% (51537/51537), 27.12 MiB | 62.00 KiB/s, done.
remote: Total 51537 (delta 37827), reused 46956 (delta 33277), pack-reused 0
Resolving deltas: 100% (37827/37827), completed with 2177 local objects.
jason@Jason ~ %

发表评论

您的电子邮箱地址不会被公开。