[前言]
Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷
[安装]
1、安装homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git//usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
2、安装brew cask
git clone git://mirrors.ustc.edu.cn/homebrew-core.git//usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
3、替换国内源(中科大),替换结束,重启shell软件
cd "$(brew --repo)"git remote set-url origin https://mirrors.ustc.edu.cn/brew.gitcd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.gitcd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
4、官网安装方式,受网络影响,安装缓慢,慎用
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
[官网]