homebrew&MacPorts更换安装源

Homebrew是Mac系统下用于软件管理的,就像window下面的 很多软件管家一样。

 

另外也有MacPorts也是干同样的事情,在darwin系的linux也是用ports。

 

Homebrew

1、Homebrew的安装在http://brew.sh/index_zh-cn.html上面有介绍,很简单。一般前提是要安装ruby,然后执行一段脚本即可安装。

2、切换安装源

// 1、进入Homebrew的安装目录
cd /usr/local/Homebrew

// 2、切换安装源

// 清华镜像源
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

 

3、更新下

brew upgrade

 

 

MacPorts

1、安装

从https://www.macports.org/install.php中下载对应dmg安装包后双击安装

2、更改安装源,参考:

https://www.leg.uct.ac.za/mirrors/packages/macports

 

posted @ 2017-02-08 10:53  gabin  阅读(3228)  评论(0编辑  收藏  举报