美文网首页iOS技术栈
pod search 无效解决方式(尝试删除~/Library/

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

作者: 汗青fullstack | 来源:发表于2020-10-29 22:51 被阅读0次

尝试删除~/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

相关文章

网友评论

    本文标题:pod search 无效解决方式(尝试删除~/Library/

    本文链接:https://www.haomeiwen.com/subject/dozlvktx.html