CocoaPods错误:RPC失败;卷曲18转移关闭,剩余未完成的读取数据

时间:2016-09-25 12:17:16

标签: ios cocoapods

当我尝试使用CocoaPods导入Realm时,如下所示: pod install --verbose --no-repo-update 然后发生错误: 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 fatal: clone of 'https://github.com/ColinH/PEGTL' into submodule path '/private/var/folders/51/tzbm7yqs3bsck5vxz3xj5pkc0000gn/T/d20160925-2957-1pu1dou/Realm/ObjectStore/external/pegtl' failed 为什么呢?

2 个答案:

答案 0 :(得分:2)

Mac OS 10.11,一些cocoapods命令要更改。如果你有pod设置或pod更新问题,而且很难解决,我建议10.11。安装cocoapods后卸载重新安装有一些不同的命令,总结如下:

1检查ruby环境,如有必要,请按以下步骤更新

$ sudo gem update --system

2卸载cocoapods

$ sudo gem uninstall cocoapods

3重新安装cocoapods(安装程序命令已更改)

10.11之前

$ sudo gem install cocoapods

10.11之后

$ sudo gem install -n /usr/local/bin cocoa pods

4

$ sudo chmod +rx /usr/local/bin
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

//将CocoaPods Specs存储库副本放到目录〜/ .cocoapods下的计算机

pod setup

答案 1 :(得分:2)

上述错误主要是由于os10.11 +和cocoapods1.0 +版本升级的安全性机制更改所致。主要在pod设置过程中。而且此过程的等待时间很长

git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master

与广告连播设置相同的效果