Xcode路径改变导致CocoaPods报错

在pod install或pod update时出现如题的错误提示:
...
Setting up CocoaPods master repo
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

 named `master-1` 这个错误是我这边master 重复,需要先删除原master
/Users/用户名/.cocoapods/repos/master

pod install 或者pod setup 又出现新问题

我这边是Xcode 路劲问题  . 我进行了升级更新,我还有两个
首先看下,系统选择的Xcode
xcode-select -p 
输出
/Applications/Xcode8.3.2.app/Contents/Developer

可是我的是Xcode8.3.3  and Xcode9.0
所以重新指定Xcode路劲就可以了

sudo xcode-select -switch /Applications/Xcode8.3.3.app/ 

你可能感兴趣的:(Xcode路径改变导致CocoaPods报错)