CocoaPods更新

1、版本查看(pod --version)

2、版本更新(sudo gem install cocoapods)

3、更新中遇到的问题:

a、ruby源地址报错

(Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://gems.ruby-china.org/ - bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz))

解决:

更换ruby源,删掉失效的源(gem sources --removehttps://gems.ruby-china.org/)

添加可用的源(gem sources -ahttps://gems.ruby-china.com)

查看当前源(gem source -l)

b、权限错误

ERROR: While executing gem … (Gem::FilePermissionError)You don’t have write permissions for the /usr/bin directory。)

解决:(sudo gem install -n /usr/local/bin cocoapods)

你可能感兴趣的:(CocoaPods更新)