参考:《解决 pod setup 错误、失败的问题 》
https://blog.csdn.net/smxalong/article/details/84402789
pod安装和制定版本
报错
执行pod setup
后,等很久还是失败了
$ pod setup
Setting up CocoaPods master repo
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Enumerating objects: 577, done.
remote: Counting objects: 100% (577/577), done.
remote: Compressing objects: 100% (545/545), done.
Receiving objects: 1% (44321/4133398), 8.86 MiB | 8.00 KiB/s 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
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --progress
Cloning into 'master'...
remote: Enumerating objects: 577, done.
remote: Counting objects: 100% (577/577), done.
remote: Compressing objects: 100% (545/545), 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
解决
- 官网下载Specs,
https://github.com/CocoaPods/Specs.git
- 解压
Specs-master.zip
,把解压后的Specs-master
文件夹里面所有文件放到.cocoapods/repos/master/
里面
AlgoliaSearch.yml
Gemfile
README.md
Specs
CocoaPods-version.yml Gemfile.lock
Scripts
netlify.toml
- 进入maser目录(没有就自己建)
$ cd .cocoapods/repos/master/
- git初始化
$ git init
- 关联仓库
$ git remote add origin https://github.com/CocoaPods/Specs
- 查看repo是否正常
$ pod repo
master
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
- Type: git (unknown)
- URL: https://github.com/CocoaPods/Specs
- Path: /Users/weever/.cocoapods/repos/master
1 repo
- 测试下
pod search
和pod install
,首次比较慢
$ pod search AFNetwork
Creating search index for spec repo 'master'.. Done!
[!] Skipping `OCast` because the podspec contains errors.
[!] Skipping `OCastReferenceDriver` because the podspec contains errors.
[!] Skipping `TEST-MiniPlengi` because the podspec contains errors.
网友评论