安装yarn执行brew install brew 报错,如下
==> Pouring libuv-1.41.0.big_sur.bottle.tar.gz tar: Error opening archive: Failed to open '/Users/boht/Library/Caches/Homebrew/downloads/33581b45642e968ac66394c09ee13cc00245e1720f7602ece1bb0a1385ce88d3--libuv-1.41.0.big_sur.bottle.tar.gz' Error: Failure while executing; `tar --extract --no-same-owner --file /Users/boht/Library/Caches/Homebrew/downloads/33581b45642e968ac66394c09ee13cc00245e1720f7602ece1bb0a1385ce88d3--libuv-1.41.0.big_sur.bottle.tar.gz --directory /var/folders/7y/768k0q7n4_18c95g590ff_340000gp/T/d20210722-35470-1bj54by` exited with 1. Here's the output: tar: Error opening archive: Failed to open '/Users/boht/Library/Caches/Homebrew/downloads/33581b45642e968ac66394c09ee13cc00245e1720f7602ece1bb0a1385ce88d3--libuv-1.41.0.big_sur.bottle.tar.gz'
切换源就可以
阿里
# 替换brew.git cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git # 替换homebrew-core.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git # 刷新源 brew update
腾讯
替换brew.git: cd "$(brew --repo)" git remote set-url origin https://mirrors.cloud.tencent.com/homebrew/brew.git 替换homebrew-core.git: cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-core.git # 刷新源 brew update
清华
# 替换brew.git cd "$(brew --repo)" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git # 替换homebrew-core.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git # 刷新源 brew update