记录一下心累的pods安装

1、运行pod setup

            出现错误提示:

[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.gitmaster --progress

Cloning into 'master'...

remote: Counting objects: 2439511, done. 

remote: Compressing objects: 100% (487/487), done. 

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

各种查到的解决办法:

1、执行git clone https://git.coding.net/CocoaPods/Specs.git~/.cocoapods/repos/master

            去除了目录的下载,只下载master文件到目的路径(成功了)

2、其实报这个错最终的原因还是的我的网太卡,在这个过程中我有修改config文件扩大容量,在~/.cocoapods/.git/......下找

[http]

postBuffer = 524288000   扩大(容量?)500M

3、pod install 报错

[!] Error installing libwebp

[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp/var/folders/c1/4crmt7hn2_nf_xsqpcgjvxj40000gp/T/d20180919-1324-tj7en --template= --single-branch --depth 1 --branch v0.6.0

Cloning into '/var/folders/c1/4crmt7hn2_nf_xsqpcgjvxj40000gp/T/d20180919-1324-tj7en'...

fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.comport 443: Operation timed out

修改方法 

1、找到specs 文件里面搜索libweb  找到报错的版本0.6.0 修改里面的git 地址

https://github.com/wsebmproject/libwebp.git 这个是肯定能用的

2、想象到的修改host文件用来翻墙,在Git上下载下来的,没有测试可用不可用

github地址:https://github.com/racaljk/hosts

4、更新pod 报错

[!] 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`

反复操作都无法更新,网络也是没问题的(最终弄证明还是我的网的问题,借了一个VPN十五分钟搞定了),可能就是由于本地数据库损坏造成的,我们可以直接进入 CocoaPods 本地目录里手动更新它:

1 ~/.cocoapods/repos/master

2 git pull

3 git checkout master

执行后再回到项目中即可正常 pod update.  也可以直接拷贝一份过去替换

你可能感兴趣的:(记录一下心累的pods安装)