`pod install`失败,提示none of your source contain a spec staisfying the dependencies

653 阅读1分钟
1. pod install 失败

在执行pod install的时候会失败,提示如下:

image.png 按提示执行pod install --repo-update之后,还是失败。 截图不发了, 问题的根本原因还是没有找到,哈哈.

原因: 由于本地索引库没有更新到最新,找不到对应版本的spec文件,按如下方法执行:

解决办法:

// 以本地master的实际目录为准:
cd ~/.cocoapods/repos/master
Git pull
执行完这两个命令之后,再执行pod install即可.

不过以上方法可能比较耗时,并且下载了很长时间也会失败.

image.png