Homebrew安装cocoapods: zsh: command not found: brew解决方法

问题描述:

通过Homebrew安装cocoapods时,输入命令行 

brew install cocoapods

出现如下报错:

zsh: command not found: brew

zsh:找不到命令:brew

问题解决:

使用以下命令,重新安装Homebrew.

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

 选择中科大下载源,输入开机密码.

Homebrew安装cocoapods: zsh: command not found: brew解决方法_第1张图片

 输入Y继续克隆Core等(不需要可以不克隆),选择中科大国内源国内镜像.

Homebrew安装cocoapods: zsh: command not found: brew解决方法_第2张图片

 重启终端.输入

brew install cocoapods

发现可以成功下载cocoapods了!

Homebrew安装cocoapods: zsh: command not found: brew解决方法_第3张图片

鸣谢:https://blog.csdn.net/Darling_qi/article/details/122239824

你可能感兴趣的:(cocoapods,xcode)