本文共 1390 字,大约阅读时间需要 4 分钟。
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
pod repo add master https://github.com/CocoaPods/Specs.git
然后提示执行’pod setup’,如果出现
[!] The `master` repo is not a git repo.
进入/users/你的用户名/.cocoapods/repos,删除master文件夹
然后执行pod setup如果pod setup 不顺利 采用:Git clone ~/.cocoapods/repos/master 该过程作用与 pod setup作用相同
如果是安装多个Xcdoe,还需要选择Xcode的路径
sudo xcode-select -switch /Applications/Xcode.app/
在终端里输入下方命令可以知道Xcode的路径:
xcode-select -p2: ---------------------------------------------
问题:cocoapods was not able to update the 'master' repo.if it is a unexpected issue and persists you can inspect it running 'pod repo update --verbose'
尝试解决:
尝试1、根据提示,跑一下 pod repo update --verbose
尝试2、如果还是出现原来问题,升级 gem update cocoapods(如果CocoaPods还不是最新版本)
尝试3、如果升级还是出现原来的问题,那么重装CocoaPods 。
首先查看本地装了关于cocoapods的哪些东西,在终端输入gem list --local | grep cocoapods
接着全部卸掉上面的,在终端输入gem uninstall cocoapods
再安装,在终端输入gem install cocoapods
3 安装 pod 报错--------------------------------
1) outdate open SSL
$ rvm -v$ rvm get head
2) outdate bundle
$ gem install bundle方法二:$ gem update --system方法三:$ apt-get install openssl