第一步安装xcode 如果不安装,在安装过程中提示git的时候,提示找不到程序,然后提示安装xcode
安装homebrew
官网
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
解决方法:用国内源替换
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"