Cocoapods 安裝問題匯總

pod setup

提示下面這個錯誤:

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

去網(wǎng)上搜了一下,發(fā)現(xiàn)了這個:http://blog.csdn.net/a_ellisa/article/details/51556685,內(nèi)容大概是:

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,內(nèi)容大概是:

[!] 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項(xiàng)目fork到自己的github賬戶上

2. 下載GitHub Desktop, 然后clone Specs項(xiàng)目。

3. 將clone的Specs項(xiàng)目的文件夾改名為master,然后拖到/Users/用戶名/.cocoapods/repos目錄下。

4. 運(yùn)行pod setup

解釋:pod setup的本質(zhì)就是將https://github.com/CocoaPods/Specs上的Specs項(xiàng)目clone到/Users/用戶名/.cocoapods/repos目錄下。若此目錄下已有Specs項(xiàng)目,則會將項(xiàng)目更新到最新的狀態(tài)。由于Specs很大,容易導(dǎo)致pod setup失敗。這時就需要我們手動安裝Specs。若直接從github上下載zip文件,由于缺少git文件,會導(dǎo)致cocoa pods不使用。若用git clone,由于文件過大,容易導(dǎo)致失敗。但是使用GitHub Desktop軟件,則會提高clone的成功率,并且會給出clone的進(jìn)度。

------------華麗的分割線------------

pod intall

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

出現(xiàn)提示:

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容