pod install
- [!]Unable to add a source with url
$ pod install
pod[!] 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
[!] To setup the master specs repo, please run `pod setup`.
$ pod setup
- [!] Unable to find a specification
$ pod install
Analyzing dependencies
[!] Unable to find a specification for `AFNetworking~>3.0`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
// 解決辦法:
// 移除本地master
sudo rm -rf ~/.cocoapods/repos/master
// 移除本地緩存
sudo rm -rf ~/Library/Caches/CocoaPods/
// 重新setup,如果網(wǎng)速較慢,可以在后面加上 --verbose
pod setup
//10.14后
pod install --repo-update
- pod[!] The
master
repo is not a git repo.
$ pod install
pod[!] The `master` repo is not a git repo.
$ rm -rf ~/.cocoapods/repos/master
pod setup
pod search抽風(fēng)
$ pod search SDWebImage
[!] Unable to find a pod with name, author, summary, or description matching `SDWebImage `
//1.執(zhí)行
$ pod setup
//2.如果沒有解決問題扩借,就繼續(xù)第二步
cd ~/Library/Caches/CocoaPods/
rm search_index.json
//OK.
如果是安裝多個(gè)Xcdoe锐秦,還需要選擇Xcode的路徑
sudo xcode-select -switch /Applications/Xcode.app/
在終端里輸入下方命令可以知道Xcode的路徑:
xcode-select -p