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