homebrew切换源

薄洪涛4年前个人随笔1519

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


相关文章

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

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

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

记一次惊心动魄的服务器操作

    公司的测试服务器上面放着一些测试项目和一些临时的原型项目,某天,需要建立2个站点,老大把这个“艰巨”的任务交给了我因为配置了负载均衡,我就按部就班的操作...

编程之禅

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

记一次博客优化的过程

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

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

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

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

要开始学习了啊

要开始学习了啊

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

发表评论    

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