首页 > 编程知识 正文

mac 安装brew及设置国内镜像

时间:2023-05-05 03:28:01 阅读:193781 作者:2376

2019独角兽企业重金招聘Python工程师标准>>>

推荐镜像源

Coding推出了Brew国内镜像源,速度挺快的。

$ cd /usr/local && git remote set-url origin https://git.coding.net/homebrew/homebrew.git$ cd $home && brew update 我是用以下方法设置的,在~/.bash_profile中添加以下代码 export HOMEBREW_BOTTLE_DOMAIN=https://git.coding.net/homebrew/homebrew.git 其它镜像 cd /usr/local//清华镜像源git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew.git//中科大镜像源git remote set-url origin http://mirrors.ustc.edu.cn/homebrew.git//三者选其一即可更新

如果速度还是很慢,可以尝试以下操作:

cd ~/tmp//以下两个选一个(要与你之前选择的镜像源相同)git clone git://mirrors.tuna.tsinghua.edu.cn/homebrew.gitgit clone http://mirrors.ustc.edu.cn/homebrew.gitrm -rf /usr/local/.gitrm -rf /usr/local/Librarycp -R homebrew/.git /usr/local/cp -R homebrew/Library /usr/local/

然后重试brew update

转载于:https://my.oschina.net/yangq20/blog/889499

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。