安装Homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
选择 1 科技 安装成功
安装 cocoapods
命令执行
brew cleanup -d -v
brew install cocoapods
问题 一:curl: (28) Operation too slow. Less than 100 bytes/sec
transferred the last 5 seconds
解决方案:export HOMEBREW_NO_INSTALL_FROM_API=1
再次执行:brew install cocoapods
问题二:Disable this behaviour by setting
HOMEBREW_NO_INSTALL_CLEANUP
解决方案:export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
再次执行:brew install cocoapods
提示:brew reinstall cocoapods
执行: brew reinstall cocoapods
安装成功