最近升级了big sur,然后发现brew安装任何软件都是报错:
Error: Failure while executing; `tar --extract --no-same-owner --file /Users/xxxx/Library/Caches/Homebrew/downloads/f839b337f0ac1b367e2bdd72123940432a73834db77556858cefb671c2471aba--brotli-1.0.9.big_sur.bottle.tar.gz --directory /private/tmp/d20210623-7058-5w61ky` exited with 1.
Here's the output:
tar: Error opening archive: Failed to open '/Users/xxxx/Library/Caches/Homebrew/downloads/f839b337f0ac1b367e2bdd72123940432a73834db77556858cefb671c2471aba--brotli-1.0.9.big_sur.bottle.tar.gz'
最后通过替换homebrew-bottles才解决了问题:
如果你使用的终端是bash则执行:
1. echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
2.
3. source ~/.bash_profile
如果你使用的终端是zsh则执行:
1. echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
2.
3. source ~/.zshrc
之后再使用brew安装软件就没有问题了。