Xcode 5.1.1安装CocoaPods时出错

时间:2014-07-16 05:57:45

标签: ios xcode cocoapods

我在安装Cocoa Pod时遇到以下错误。

...........

Successfully installed cocoapods-core-0.33.1
 Fetching: cocoapods-0.33.1.gem (100%) 
ERROR: Error installing cocoapods: cocoapods requires cocoapods-try (~> 0.3.0)
------------------------------------------------------------------------

2 个答案:

答案 0 :(得分:1)

我有同样的问题并按如下方式解决:

sudo gem install cocoapods-try

在尝试安装cocoapods后,我遇到了后续错误:

ERROR:  Error installing cocoapods:
cocoapods requires cocoapods-trunk (~> 0.1.1)

这引导我尝试:

sudo gem install cocoapods-trunk

完成最后一个sudo:

sudo gem install cocoapods

你应该好好去!希望它适合你!

答案 1 :(得分:0)

我相信在安装时可能会发生一些不必要的问题,请尝试卸载cocapod并重新安装它,如下所示: -

1) Uninstall CocoaPods (choose to uninstall all versions):

sudo gem uninstall cocoapods

2) Remove old master repo:

sudo rm -fr ~/.cocoapods/repos/master

3) Install CocoaPods without sudo:

gem install cocoapods

4) Setup CocoaPods and Master repo:

pod setup

“sudo”关键字用于告诉OS您作为管理员发出命令,所以在安装时写sudo(仅提及更安全的一面)