安装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

安装成功

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐