安装cocoapods时已经替换成淘宝镜像依然无法成功:ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:

ERROR:  Could not find a valid gem 'cocoapods' (>= 0), here is why:

          Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)

是因为淘宝停止基于 HTTP 协议的镜像服务 需要改用https的协议:

gem sources --remove http://ruby.taobao.org/

gem sources -a https://ruby.taobao.org/

gem sources -l

sudo gem install cocoapods

然后就可以继续使用cocoapods了。

你可能感兴趣的:(IOS)