cocoaPods问题处理--You don't have wr

2019-10-15  本文已影响0人  iOS安年

cocoaPods问题处理

1、[!] Pod::Executable clone 'https://github.com/CocoaPods/Specs.Git' master

xcrun: error: active developer path ("/Users/xiakejie/工具/Xcode 2.app/Contents/Developer") does not exist, use xcode-select to change

解决上面这个问题, 使用这个命令: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

2、查看版本

pod --version

3、更新cocoapods

sudo gem install cocoapods

如果出现报错

ERROR: While executing gem ... (Errno::EPERM)

Operation not permitted - /usr/bin/pod

解决办法:

sudo gem install -n /usr/local/bin cocoapods

4、更新本地仓库

pod repo update

如果搜索不到,可以用这个,

rm ~/Library/Caches/CocoaPods/search_index.json

上一篇 下一篇

猜你喜欢

热点阅读