homebrew切换源

薄洪涛4年前个人随笔1708

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


相关文章

记一次博客优化的过程

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

要开始学习了啊

要开始学习了啊

新书送到,看起来又要开始学习啦最近感觉一直在瞎忙,每天看起来都在学习,却知不知道学到了什么,学到的东西很杂很乱,毫无头绪,浪费了好多时间;所以接下来的半年要自己做一个小目标,比如最少看完一半的《ngi...

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

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

19年总结--------来自依旧很菜的我

19年总结--------来自依旧很菜的我

今天是19年的最后一个工作日,临近下班做个19年的总结吧,19年是我的本命年,过的不算太好,但也不算很差,就按照时间的顺序来记录下19年的几个重要的点吧;19年3月,从前公司离职,由python转ph...

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

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

编程之禅

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

发表评论    

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