Homebrew 更新 Error汇总

更新brew

$ 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!

解决方法

  • cmd+shift+G,输入/usr/local/Homebrew/Library/Taps/homebrew,回车,删除homebrew-core,再次终端执行
$ brew update
==> Homebrew has enabled anonymous aggregate formula and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).

==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1245506, done.
remote: Counting objects: 100% (423/423), done.
remote: Compressing objects: 100% (185/185), done.
remote: Total 1245506 (delta 253), reused 359 (delta 238), pack-reused 1245083
Receiving objects: 100% (1245506/1245506), 504.34 MiB | 432.00 KiB/s, done.
Resolving deltas: 100% (857393/857393), done.
Tapped 3 commands and 6243 formulae (6,587 files, 552.6MB).
Already up-to-date.
  • 更新成功 Already up-to-date.
$  brew -v
Homebrew 3.5.8
Homebrew/homebrew-core (git revision a1ab82c9fb4; last commit 2022-08-10)

更新慢更换镜像源参考

安装homebrew

你可能感兴趣的:(Homebrew 更新 Error汇总)