MacOS 10.12 Cocoapods卸载与安装笔记
2018-03-07 14:33
495 查看
卸载
在终端中操作1.
which pod
查看 pod 安装地址
/usr/local/bin/pod
2.
sudo rm -rf /usr/local/bin/pod
删除 pod
3.
gem list
查看 cocoapods 安装包的位置
*** LOCAL GEMS *** activesupport (4.2.7.1) atomos (0.1.2) bigdecimal (default: 1.2.0) CFPropertyList (2.3.5, 2.2.8) claide (1.0.2, 1.0.1) cocoa (0.1.6) cocoapods (1.4.0) cocoapods-core (1.4.0, 1.4.0.beta.2) cocoapods-deintegrate (1.0.2, 1.0.1) cocoapods-downloader (1.1.3) cocoapods-plugins (1.0.0) cocoapods-search (1.0.0) cocoapods-stats (1.0.0) cocoapods-trunk (1.3.0, 1.1.2) cocoapods-try (1.1.0) ......
4.
sudo gem uninstall cocoapods -v 1.4.0
删除 cocoapods
5.
sudo gem uninstall cocoapods-core -v 1.4.0
删除 cocoapods-core
6.
pod
检查是否删除成功
-bash: pod: command not found
证明删除成功
安装
1.gem sources -l
查看镜像源
*** CURRENT SOURCES *** https://ruby.taobao.org/
这个已经不可用了
2.
gem sources --remove https://ruby.taobao.org/[/code]
删除镜像源https://ruby.taobao.org/ removed from sources
3.gem sources -a https://gems.ruby-china.org/[/code]
添加镜像源ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR: You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store https://gems.ruby-china.org/ added to sources
4.gem sources -l
再次查看镜像源*** CURRENT SOURCES *** https://gems.ruby-china.org/
5.sudo gem install -n /usr/local/bin cocoapods
安装ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20) ERROR: You must add /O=Digital Signature Trust Co./CN=DST Root CA X3 to your local trusted store Successfully installed cocoapods-1.4.0 Parsing documentation for cocoapods-1.4.0 1 gem installed
6.pod setupSetting up CocoaPods master repo [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
失败!!!
7.git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/masterfatal: destination path '/Users/haocold/.cocoapods/repos/master' already exists and is not an empty directory.
失败!!!
8.cd ~/.cocoapods/repos
把master文件夹删除
再执行7
等待.
等待..
等待…
完成!问题
1.[!] Unable to find a pod with name, author, summary, or description matching
要先pod setup
2.pod setup
结果Setting up CocoaPods master repo [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
3.rm ~/Library/Caches/CocoaPods/search_index.json
删除~/Library/Caches/CocoaPods目录下的search_index.json文件
再执行pod searchCreating search index for spec repo 'master'..
4.完成!!!后续
1.macOS 更新到10.13.1后
pod 又不行了:-bash: pod: command not found
2.安装sudo gem install -n /usr/local/bin cocoapods
遇到 ERROR:ERROR: While executing gem ... (TypeError) no implicit conversion of nil into String
3.先执行命令:sudo gem update --system
再安装
参考:
如何从电脑中卸载cocoapods
mac 10.12系统下的CocoaPods出现的问题,安装卸载及使用
CocoaPods安装、卸载、使用说明(Mac ox 10.11+)
CocoaPods: pod search 搜索类库失败的解决办法
相关文章推荐
- Xcode8 macOS Sierra 10.12 安装 CocoaPods
- 最新版 Xcode8 macOS Sierra 10.12 安装CocoaPods
- 在 OS X 10.11 和 macOS 10.12 上安装CocoaPods
- IOS开发笔记(Swift):Cocoapods安装与使用
- 最新 macOS Sierra 10.12.3 安装CocoaPods及使用详解
- OS X10.12上安装cocoapods
- macOS 配置安装ruby 、cocoapods,报错Gem::DependencyError
- 最新 macOS Sierra 10.12.3 安装CocoaPods及使用详解
- CocoaPods的macOS Sierra 10.12.3 安装
- cocoapods的安装,使用,卸载,以及你可能会遇到的坑..
- [iOS]CocoaPods 卸载以及 安装旧版本 适用cocoapods>1.0.0
- 在mac 10.12上安装Cocoapods
- 最新 macOS Sierra 10.12.3 安装CocoaPods及使用详解
- 安装卸载cocoaPods
- macOS sierra安装cocoapods
- 最新 macOS Sierra 10.12.3 安装CocoaPods及使用详解
- macOS 10.12.1 + Xcode 8.1 安装cocoapods 1.1.1
- IOS笔记(2)20141212 [项目环境搭建之CocoaPods的安装和使用(二)之IOS8 TodayExtension挂件]
- cocoapods 安装学习笔记