Cocoapods 安装问题汇总

pod setup

提示下面这个错误:

Performing a deep fetch of the `master` specs repo to improve future performance

去网上搜了一下,发现了这个:http://blog.csdn.net/a_ellisa/article/details/51556685,内容大概是:

pod repo upadte --verbose

rm -rf ~/.cocoapods/repos/master

再重新setup

pod setup

按照步骤做了,然后提示:

[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master

Cloning into 'master'...

error: RPC failed; curl 56 SSLRead() return error -36

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

这里提供了解决方案:http://blog.csdn.net/x1135768777/article/details/18719533,内容大概是:

[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.Git' master

xcrun: error: active developer path ("/Users/xiakejie/工具/Xcode 2.app/Contents/Developer") does not exist, use xcode-select to change

解决上面这个问题, 使用这个命令:

 sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

最新源。。。淘宝源已停止更新

在晚上找了一篇帖子《2016 cocoapods的安装和使用以及版本升级遇到的问题》http://www.cnblogs.com/yan520/p/5583362.html

最新的源为http://rubygems-china.oss.aliyuncs.com

更换最新的源,输入命令:

gem sources --remove https://ruby.taobao.org

gem sources -a http://rubygems-china.oss.aliyuncs.com

pod setup 以下错误

[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master

Cloning into 'master'...

error: RPC failed; curl 56 SSLRead() return error -36

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

输入命令:sudo gem update --system

《使用CocoaPods时遇到pod setup失败的解决办法》http://www.cocoachina.com/bbs/read.php?tid=193398&page=1

------------华丽的分割线------------

1.访问 https://github.com/CocoaPods/Specs,然后将Specs项目fork到自己的github账户上

2. 下载GitHub Desktop, 然后clone Specs项目。

3. 将clone的Specs项目的文件夹改名为master,然后拖到/Users/用户名/.cocoapods/repos目录下。

4. 运行pod setup

解释:pod setup的本质就是将https://github.com/CocoaPods/Specs上的Specs项目clone到/Users/用户名/.cocoapods/repos目录下。若此目录下已有Specs项目,则会将项目更新到最新的状态。由于Specs很大,容易导致pod setup失败。这时就需要我们手动安装Specs。若直接从github上下载zip文件,由于缺少git文件,会导致cocoa pods不使用。若用git clone,由于文件过大,容易导致失败。但是使用GitHub Desktop软件,则会提高clone的成功率,并且会给出clone的进度。

------------华丽的分割线------------

pod intall

Cloning spec repo `coding-cocoapods-specs` from `https://git.coding.net/CocoaPods/Specs.git`

出现提示:

[!] Unable to add a source with url `https://git.coding.net/CocoaPods/Specs.git` named `coding-cocoapods-specs`.

You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

用命令

pod install --verbose --no-repo-update

《CocoaPods pod install/pod update更新慢的问题》http://blog.csdn.net/sirchenhua/article/details/51029918

你可能感兴趣的:(Cocoapods 安装问题汇总)