mac 安装Homebrew提示brew command not found的解决方法

mac端安装brew的方法:只需要打开终端,输入以下代码即可

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

但由于某些国内原因,会禁止至github,会提示以下错误:

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

国内针对以上问题,下面提供一种在线安装brew的方法,根据个人需求在终端输入相应的代码:

完整版安装代码

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

极速版安装代码

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" speed

卸载脚本

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"

安装完成之后,需要运行以下代码进行查看:

brew --version

如果出现下面情况,则表示安装成功

mac 安装Homebrew提示brew command not found的解决方法_第1张图片

你可能感兴趣的:(macos)