fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services
fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services' is owned by someone else)
To add an exception for this directory, call:
...
...
...
fatal: not in a git directory
Error: Command failed with exit 128: git
按照错误提示,进行git config
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services
git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-caskgit
tar: Error opening archive: Failed to open '/Users/didi/Library/Caches/Homebrew/downloads/fee13f1bfa4b2a3b6f32e14e9f0cb1b6bf34cfdc2d571d047331872c9b940807--apr-util-1.6.1_3.big_sur.bottle.tar.gz'
Error: Failure while executing; `tar --extract --no-same-owner --file /Users/didi/Library/Caches/Homebrew/downloads/fee13f1bfa4b2a3b6f32e14e9f0cb1b6bf34cfdc2d571d047331872c9b940807--apr-util-1.6.1_3.big_sur.bottle.tar.gz --directory /private/tmp/d20220811-11463-19frpj7` exited with 1. Here's the output:
tar: Error opening archive: Failed to open '/Users/didi/Library/Caches/Homebrew/downloads/fee13f1bfa4b2a3b6f32e14e9f0cb1b6bf34cfdc2d571d047331872c9b940807--apr-util-1.6.1_3.big_sur.bottle.tar.gz'
临时修改去掉国内的镜像设置: 在 Terminal 中输入下面的命令即可
export HOMEBREW_BOTTLE_DOMAIN=""