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)
作者:哇很瓜皮
链接:https://www.jianshu.com/p/eb016123bb24
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
网友评论