解決OS X 10.11 升級 cocoapods帶來的問題

尷尬今天手賤升級了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`.  

再加一句,完美解決得意


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章