专业的编程技术博客社区

网站首页 > 博客文章 正文

mac升级bigSur11.4后brew install失败

baijin 2024-09-02 11:08:38 博客文章 4 ℃ 0 评论

brew install node 或者安装任何其他的都报错,找不到压缩文件

tar: Error opening archive: Failed to open '/Users/wuwanjie/Library/Caches/Homebrew/downloads/0d87acfe02fd57ec63899efc1e6ae5c69d9432e357fb179d0c9637cd00f8d83c--libuv-1.41.1.big_sur.bottle.tar.gz'
Error: Failure while executing; `tar --extract --no-same-owner --file /Users/wuwanjie/Library/Caches/Homebrew/downloads/0d87acfe02fd57ec63899efc1e6ae5c69d9432e357fb179d0c9637cd00f8d83c--libuv-1.41.1.big_sur.bottle.tar.gz --directory /private/tmp/d20210727-1086-zkjw4h` exited with 1. Here's the output:
tar: Error opening archive: Failed to open '/Users/wuwanjie/Library/Caches/Homebrew/downloads/0d87acfe02fd57ec63899efc1e6ae5c69d9432e357fb179d0c9637cd00f8d83c--libuv-1.41.1.big_sur.bottle.tar.gz' 



解决方法:

1、替换homebrew-bottles:

首先要先区分你的mac用哪种终端工具,如果是 bash,则执行

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

若是zsh,则执行

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

2、brew update #刷新源

到此,你就可以正常安装node或者其他软件了。

最后推荐大家一个homebrew国内源脚本:

https://gitee.com/cunkai/HomebrewCN/

苹果电脑标准安装脚本:(推荐 优点全面 缺点慢一点):

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表