一、国内镜像安装
命令:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
二、查看命令
brew -v # Homebrew版本
brew search <name> # 查找
brew install <name> # 安装
brew ls # 查看已安装软件
brew outdated # 查看存在可用更新的软件
三、备注
- 编辑.zshrc,添加下面命令,然后 source .zshrc
# 加载brew 相关配置
export HOMEBREW_PIP_INDEX_URL=http://mirrors.aliyun.com/pypi/simple #ckbrew
export HOMEBREW_API_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles/api #ckbrew
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles #ckbrew
eval $(/opt/homebrew/bin/brew shellenv) #ckbrew
- 如果gitee:选择2安装不行,可以用1 亲测可以