iOS 进阶

iOS cocoapods快速安装方法(pod setup卡着不

2019-01-24  本文已影响40人  小盟城主

在执行pod setup,接下来出现Setting up CocoaPods master repo,然后会一直卡着不动了,哪怕是镜像是切换到国内的,如https://gems.ruby-china.com/,但是还是很慢,这时可以采用下面方法

//首先切换到repos目录下
cd ~/.cocoapods/repos
//然后git下Specs文件 该过程作用与pod setup作用相同
git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master

在pod出现的问题

在执行pod setup,如果出现下面的问题

[!] The `master` repo is not a git repo.

先删除master文件,进入/users/你的用户名/.cocoapods/repos,删除master文件夹

cd ~/.cocoapods/repo
open .

或者采用下面的方法

pod repo remove master

有时候出现这个问题

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

Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

同样是采用最上面的方法。

上一篇 下一篇

猜你喜欢

热点阅读