码迷,mamicode.com
首页 > 系统相关 > 详细

macbook安装homebrew并更换清华源

时间:2018-07-22 11:11:55      阅读:292      评论:0      收藏:0      [点我收藏+]

标签:domain   repo   网址   安装完成   mirrors   安装   port   更换   .sh   

1、官网brew.sh复制安装脚本。

2、自动安装完成后,更换为清华源来加快速度。网址为:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew

3、更换homebrew

cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.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

更换homebrew-bottles

长期更换
echo export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles >> ~/.bash_profile
source ~/.bash_profile
临时更换
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles

 

macbook安装homebrew并更换清华源

标签:domain   repo   网址   安装完成   mirrors   安装   port   更换   .sh   

原文地址:https://www.cnblogs.com/litifeng/p/9348936.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!