[!] 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

如果是安装多个Xcdoe,还需要选择Xcode的路径

sudo xcode-select -switch /Applications/Xcode.app/

在终端里输入下方命令可以知道Xcode的路径:

xcode-select -p
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐