安装brew:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
安装ruby:brew install ruby
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
安装pods:
brew install cocoapod
更新三方库执行pod update时报错[!] CocoaPods was not able to update the cocoapods
repo. If this is an unexpected issue and persists you can inspect it running pod repo update --verbose
解决办法:
执行:pod repo list
看到有两个repo
cocoapods
- Type: git (unknown)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/amarantine/.cocoapods/repos/cocoapods
master
- Type: git (master)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/amarantine/.cocoapods/repos/master
执行:pod repo remove cocoapods 把不用的repo删除
删除成功后在执行:pod update 就好了