您的位置:首页 > 编程语言 > Ruby

CocoaPods安装后出现[!] Unable to find a pod with name, author, summary, or description matching

2017-06-30 18:03 633 查看
CocoaPods安装使用阿里ruby:

1.删除自带的ruby镜像,终端输入:

gem sources --remove https://rubygems.org/[/code] 
2.添加阿里的镜像,终端输入:

gem sources -a http://rubygems-china.oss.aliyuncs.com[/code] 
3.用命令查看是否修改源成功

gem sources -l


4.出现以下则成功

*** CURRENT SOURCES ***
 http://rubygems-china.oss.aliyuncs.com[/code] 
5.安装cocoapods

sudo gem install cocoapods


6.出现以下则安装成功

27 gems installed


7.其实在你安装CocoaPods执行pod install时,系统会默认操作pod setup,然而由于中国强大的墙可能会pod setup不成功。这时就需要手动执行pod setup指令

pod setup


8.然后需要等很长时间

9.成功后执行

pod search AFNetworking


10.可能会出现

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


11.pod setup成功后,依然不能pod search,是因为之前你执行pod search生成了search_index.json,此时需要删掉

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


12.删除成功后,再执行

pod search afnetworking


13.输出:

Creating search index for spec repo 'master'..


14.等待成功,成功之后输出

Creating search index for spec repo 'master'.. Done!


15.然后会自动进入你搜索的第三方库。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐