美文网首页
CocoaPods更新

CocoaPods更新

作者: 男神nick | 来源:发表于2021-10-19 14:15 被阅读0次

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

来源:简书

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

相关文章

网友评论

      本文标题:CocoaPods更新

      本文链接:https://www.haomeiwen.com/subject/nwdaoltx.html