iOS技术栈

pod search 无效解决方式(尝试删除~/Library/

2020-10-29  本文已影响0人  汗青fullstack

尝试删除~/Library/Caches/CocoaPods/search_index.json重新pod search无效
总是提示:

$ pod search AFNetworking
Setup completed
[!] Unable to find a pod with name, author, summary, or description matching `AFNetworking`
处理方式:

pod setup的就是将https://github.com/CocoaPods/Specs.git的代码下载到~/.cocoapods/repos/master,我发现我本地就没有~/.cocoapods/repos目录,然后创建了该目录mkdir -p ~/.cocoapods/repos/
接着进行以下操作

$ pod repo remove master
$ cd ~/.cocoapods/repos
$ git clone --depth 1 https://github.com/CocoaPods/Specs.git master
$ rm ~/Library/Caches/CocoaPods/search_index.json
$ pod search afnetworking
最终成功的截图:
image.png
上一篇下一篇

猜你喜欢

热点阅读