homebrew切换源

薄洪涛4年前个人随笔1883

安装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


相关文章

留下了佩服的泪水

留下了佩服的泪水

偶然看到Yii框架作者强哥的github,大佬,真心佩服...

我想成为一名真正的程序员

最近看了 左耳朵耗子 写的一段话:所以,我和一些人开玩笑说,我们可能都是在写一样的 for(int i=0; i<n; i++) 语句,但是,你写在那个地方一文不值,而我写在这个地方,这行代码就...

编程之禅

Beautiful is better than ugly. (优美比丑陋好)Explicit is better than implicit.(清晰比晦涩好)Simple is better tha...

宏碁V3-575G笔记本开启一键起飞模式

宏碁V3-575G笔记本开启一键起飞模式

工作本,使用3年的老宏碁笔记本,刚开始买的时候,散热刚刚的,现在散热越来越不行,玩个小游戏都分分钟高温报警,清灰也没有用,也没有一键强冷模式;比较坑;今天突发奇想,笔记本的风扇是三根线,如图为什么是三...

18年总结-----来自很菜的我

不知不觉,毕业快2年了,整个17年末到整个18年收获还是蛮大的;    1、学习了新的语言-----python,学会使用scrapy爬虫框架,学习了各种爬虫技...

记一次博客优化的过程

近期博客访问越来越慢,有时候网络不好的时候打开一个页面需要5秒以上,所以我决定对博客来一次彻底的优化;然后本文记录了优化的过程及步骤1. 优化了代码结构    ...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。