删除~/Library/Caches/CocoaPods目录下的search_index.json文件 终端输入rm ~/Library/Caches/CocoaPods/search_index.json

Last login: Thu Dec 15 09:16:58 on ttys002

iMac:~ xlsn0w$ gem sources --remove https://rubygems.org/

source https://rubygems.org/ not present in cache

iMac:~ xlsn0w$ gem sources -a https://gems.ruby-china.org/

https://gems.ruby-china.org/ added to sources

iMac:~ xlsn0w$ gem sources-l

ERROR:While executing gem ... (Gem::CommandLineError)

Unknown command sources-l

iMac:~ xlsn0w$ sudo geminstall-n/usr/local/bincocoapods

Password:

sudo: geminstall-n/usr/local/bincocoapods: command not found

iMac:~ xlsn0w$ pod --version

1.2.0.beta.1

iMac:~ xlsn0w$ pod search XLsn0w

Setting up CocoaPods master repo

Setup completed

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

iMac:~ xlsn0w$ pod search AFNetworking

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

iMac:~ xlsn0w$ cd ~/.cocoapods

iMac:.cocoapods xlsn0w$ cd ~/.cocoapods

iMac:.cocoapods xlsn0w$ pod search AFNetworking

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

iMac:.cocoapods xlsn0w$sudo gem uninstall cocoapods -v 1.2.0.beta.1

Password:

Successfully uninstalled cocoapods-1.2.0.beta.1

iMac:.cocoapods xlsn0w$ gem sources --remove https://rubygems.org/

source https://rubygems.org/ not present in cache

iMac:.cocoapods xlsn0w$ gem sources -a https://gems.ruby-china.org/

source https://gems.ruby-china.org/ already present in the cache

iMac:.cocoapods xlsn0w$ gem sources-l

ERROR:While executing gem ... (Gem::CommandLineError)

Unknown command sources-l

iMac:.cocoapods xlsn0w$ gem sources-l

ERROR:While executing gem ... (Gem::CommandLineError)

Unknown command sources-l

iMac:.cocoapods xlsn0w$ sudo gem install -n /usr/local/bin cocoapods -v 1.1.1

Fetching: cocoapods-core-1.1.1.gem (100%)

Successfully installed cocoapods-core-1.1.1

Fetching: cocoapods-1.1.1.gem (100%)

Successfully installed cocoapods-1.1.1

Parsing documentation for cocoapods-core-1.1.1

Installing ri documentation for cocoapods-core-1.1.1

Parsing documentation for cocoapods-1.1.1

Installing ri documentation for cocoapods-1.1.1

2 gems installed

iMac:.cocoapods xlsn0w$ pod search XL

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

iMac:.cocoapods xlsn0w$ rm ~/Library/Caches/CocoaPods/search_index.json

iMac:.cocoapods xlsn0w$ rm ~/Library/Caches/CocoaPods/search_index.json

rm: /Users/XL/Library/Caches/CocoaPods/search_index.json: No such file or directory

iMac:.cocoapods xlsn0w$ pod search AFN

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

iMac:.cocoapods xlsn0w$ pod search XLsn0w

iMac:.cocoapods xlsn0w$

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容