cocopods安装过程中遇到的问题

一, 在执行pod setup命令的时候, 出现下列问题.

c fatal: unable to access ‘https://github.com/CocoaPods/Specs.git/‘: LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
[!] CocoaPods was not able to update the master repo. If this is an unexpected issue and persists you can inspect it running pod repo update --verbose

命令执行失败, 根据给出提示:更新本地库 . 又按提示执行:
又按提示的,执行:

$ pod repo update –verbose

结果还是不行, 报如下错误.

fatal: unable to access ‘https://github.com/CocoaPods/Specs.git/‘: Empty reply from server
[!] CocoaPods was not able to update the master repo. If this is an unexpected issue and persists you can inspect it running pod repo update --verbose

这个是网络原因造成, 再次执行 pod repo update –verbose .

命令执行成功了!

再执行pod setup 命令, 也成功了

Setup completed

二, 在查看pod安装是否正常完成, 执行pod search AFNetworking命令时出现错误

[!] Unable to find a pod with name, author, summary, or description matching AFNetworking

各种搜索之后, 得出结论: 删除~/Library/Caches/CocoaPods目录下的search_index.json文件 :
原因在于pod setup 还没有执行成功之前, 我执行过pod search AFNetworking这个命令出错.
所以, 现在pod setup 命令执行成功之后, 这个文件要删除掉, 该search命令才能正常使用.

$ rm ~/Library/Caches/CocoaPods/search_index.json

删除之后,
再执行 pod search AFNetworking 命令就没有错误了.

猜你喜欢

转载自blog.csdn.net/xNickname666/article/details/81628249