1、升级gem
sudo gem update --system
2、据说淘宝源已经不再维护,就改用官网的吧
sudo gem sources --remove?https://ruby.taobao.org/
sudo gem sources -a?https://rubygems.org/
或使用这个路径源(https://gems.ruby-china.org/)
3、重装 pod?
sudo gem uninstall cocoapods
sudo gem install -n /usr/local/bin cocoapods