cocoa pods 更新失败

gem source -l

如果显示:

* CURRENT SOURCES *

https://ruby.taobao.org/

移除

sudo gem install cocoapods

ERROR: While executing gem … (OpenSSL::SSL::SSLError)

hostname “upyun.gems.ruby-china.org” does not match the server certificate

gem sources –remove https://ruby.taobao.org/

gem sources -a https://gems.ruby-china.org

sudo gem update –system

sudo gem install -n /usr/local/bin cocoapods –pre

pod –version

1.2.1

更新成功

提示错误:

ERROR:  While executing gem ... (URI::InvalidURIError)

bad URI(is not URI?): ?gems=–pre

执行pod setup


参考:http://www.cnblogs.com/i-am-lvjiazhen/p/6136502.html

https://www.2cto.com/kf/201705/639919.html

你可能感兴趣的:(cocoa pods 更新失败)