您的位置:首页 > 其它

MAC升级到10.13后cocoapods报错

2018-03-30 15:05 246 查看
1. applematoiMac:~ apple$ cd /Users/apple/Desktop/XiangMu2.applematoiMac:XiangMu apple$ pod update MJRefresh此时出现错误一:-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory3.终端输入: sudo gem install -n /usr/local/bin cocoapods此时出现错误二:Password:Sorry, try again.Password:Sorry, try again.Password:sudo: 3 incorrect password attempts这里是因为mac的用户与群组里面没有给当前用户设置密码,设置好密码后就好了。4.重复3的输入内容此时出现错误三:ERROR:  While executing gem ... (TypeError)    no implicit conversion of nil into String5.终端输入:pod --version再次提示:-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory6.终端输入:gem update --system此时出现错误四:ERROR:  While executing gem ... (Gem::FilePermissionError)    You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.7.解决办法:(a)在终端输入:sudo gem update --system 提示:RubyGems system software updated表示成功8.(b)在终端再输入:sudo gem install -n /usr/local/bin cocoapods
提示成功后,可以查看 cocoapods 是否为最新版本9.此时再次输入:pod update MJRefresh出现错误五: error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`此时,当再次输入pod update MJRefresh的时候,就更新成功了,就是特别慢。。。
  
 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: