今天手贱升级了OS X 10.11
,cocoaPods失效!
Im assuming you're running OS X 10.11.
This is happening because Apple has enabled rootless on the new install.
If you type sudo nvram boot-args="rootless=0"; sudo reboot in terminal.app Your computer will reboot with it disabled.
Once that is done, type
sudo gem install cocoapods -V
the -V is for verbose and will spit out any errors if they happen.
This also works.
sudo gem install -n /usr/local/bin cocoapods
- pod install一下后,提示:
AdeMacBook-Pro:cbt-ios-app A$ pod install
Updating local specs repositories
xcrun: error: active developer path ("/Applications/Xcode6.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)
xcrun: error: active developer path ("/Applications/Xcode6.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)
Creating shallow clone of spec repo `master-1` from `https://github.com/CocoaPods/Specs.git`
[!] 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`.
再加一句,完美解决
- sudo xcode-select --switch /Applications/Xcode.app
- 参考:http://stackoverflow.com/questions/30812777/cannot-install-cocoa-pods-after-uninstalling-results-in-error/30851030#30851030