更新了cocoapods出现了这样的问题
$ sudo pod install
/Users/YSQ/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/claide-0.5.0/lib/claide/command.rb:328:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
CocoaPods, the Objective-C library package manager.
Commands:
* help Show help for the given command.
* init Generate a Podfile for the current directory.
- install Install project dependencies
* ipc Inter-process communication
* lib Develop pods
* list List pods
* outdated Show outdated project dependencies
* push Push new specifications to a spec-repo
* repo Manage spec-repositories
* search Searches for pods
* setup Setup the CocoaPods environment
* spec Manage pod specs
* update Update outdated project dependencies
Options:
--silent Show nothing
--version Show the version of CocoaPods
--no-ansi Show output without ANSI codes
--verbose Show more debugging information
--help Show help banner of specified command
from /Users/YSQ/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods/command.rb:46:in `run'
from /Users/YSQ/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/cocoapods-0.32.1/bin/pod:33:in `<top (required)>'
from /Users/YSQ/.rvm/rubies/ruby-2.0.0-p247/bin/pod:23:in `load'
from /Users/YSQ/.rvm/rubies/ruby-2.0.0-p247/bin/pod:23:in `<main>'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
直接
$ [sudo] gem install cocoapods
就好了,sudo
可选.sudo pod install
You cannot run CocoaPods as root
楼主,我也遇到同样的问题,昨天更新的cocoapods0.32.1后出
现/Library/Ruby/Gems/2.0.0/gems/claide-0.5.0/lib/claide/command.rb:328:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
CocoaPods, the Objective-C library package manager.
Commands:
Options:
先运行
sudo rm -fr ~/.cocoapods/repos/master
然后
pod setup
试试...
用上面的代码,原因是cocoapods升级后出现冲突。
如果速度慢的话,且你有gae,给本次的终端设置代理
如果你遇到git证书问题,可以导入gae的证书
以上
以上答案皆不管用。
CocoaPods 在 0.32.0 去掉了 root 权限运行命令。这个问题可能是缓存中有一些需要 root 权限运行的文件,所以试试删除缓存的方法。
先删除全局的缓存:
还不行的话就把当前 Pods 目录清空:
之后再运行:
CocoaPods 的 Troubleshooting 有一段解释:I'm getting permission errors while running pod commands。
http://blog.csdn.net/hengshujiyi/article/details/40303457
参照这个帖子,我居然奇迹般的好了。怪哉~
接着执行运行:$ sudo gem install cocoa pods
就好了