1.如果运行sudo gem install cocoapods ,提示ERROR: Failed to build gem native extension.
说明rvm版本过低,这时候curl -L https://get.rvm.io | bash -s stable下载最新版本;
2.但是curl -L https://get.rvm.io | bash -s stable,有可能会被拒绝访问,
通过如下操作
sudo vim /etc/hosts
#绑定host
199.232.28.133 raw.githubusercontent.com
并保存 souce /etc/hosts
继续curl -L https://get.rvm.io | bash -s stable;
3.能访问后,运行 rvm install ruby-2.7.2 下载最新版本rvm,提示Install of ruby-2.7.2 - #complete说明成功;
4.如果再遇到homebrew下载安装失败的情况,报错:fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_read - Homebrew
https://blog.csdn.net/survivorsfyh/article/details/103960551
5.下载后继续sudo gem install cocoapods 安装cocoapods;
总的来说就是更新rvm版本,如果homebrew下载失败需要解决,然后就可以安装cocoapods了