转载自:http://blog.csdn.net/liuyujinglove/article/details/40582197

http://blog.csdn.net/dqjyong/article/details/37958067
大概步骤如下:

Open Xcode 6
    Open Preferences
    Click theLocationstab
    Change theCommand Line Toolsversion toXcode 6.0
    Uninstallcocoapods

a.$ sudo gem uninstall cocoapods

Installxcodeproj

    a.$ sudo gem install xcodeproj

Installcocoapods

 a.$ sudo gem install cocoapods
 $ pod --version

如果你执行到第6步:sudo gem install xcodeproj 成功,但是到第七步:$ sudo gem install cocoapods时失败,错误信息如下:

ERROR:Could not find a valid gem 'cocoapods' (>= 0), here is why:Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2) (https://rubygems.org/latest_specs.4.8.gz)ERROR:Possible alternatives: cocoapods

意识是说在官方源中找不到我们需要的源,这时怎么办呢,网上找到一篇博客,这样做的,切换官方源,也即是改变源的获取地址

这时候我们需要改变 gem source, 参考[4], [5]。需要在终端中执行如下命令:

$ gem sources -l

$ gem sources --remove https://rubygems.org/

$ gem sources -a https://ruby.taobao.org/

$ gem sources -l

接下来输入以下命令:

$ pod setup

This processwilllikely take a while as this command clones the CocoaPods Specs repository

into ~/.cocoapods/ on your computer. []

至此CocoaPods安装完毕。

注:如果漏掉 "$ pod setup" 命令,而直接执行"$ pod init"

会有类似以下的error信息:

$ pod init

Setting up CocoaPods master repo

[!] /usr/bin/git clone 'https://github.com/CocoaPods/Specs.git' master --depth=

Cloning into 'master'...

error: RPC failed; result=, HTTP code = 

fatal: The remote end hung up unexpectedly

/Library/Ruby/Gems/2.0./gems/claide-0.6./lib/claide/command.rb::in `handle_exception': undefined method `verbose?' for nil:NilClass (NoMethodError)

from /Library/Ruby/Gems/2.0./gems/claide-0.6./lib/claide/command.rb::in `rescue in run'

from /Library/Ruby/Gems/2.0./gems/claide-0.6./lib/claide/command.rb::in `run'

from /Library/Ruby/Gems/2.0./gems/cocoapods-0.33./lib/cocoapods/command.rb::in `run'

from /Library/Ruby/Gems/2.0./gems/cocoapods-0.33./bin/pod::in `<top (required)>'

from /usr/bin/pod::in `load'

from /usr/bin/pod::in `<main>' "

以上操作步骤完成后在进行:

$ sudo gem install cocoapods

这时就成功了!

剩下的就是和以前的一样在工程目录下,建Podfile,执行pod install,打开xworkspace等,顺利完成!!!

参考博客:http://www.cnblogs.com/cwgk/p/3370949.html

osx升级到10.10后,用pod install报错最终解决办法的更多相关文章

  1. Xcode8 pod install 报错 “Generating Pods project Abort trap

    Xcode8 pod install 报错 "Generating Pods project Abort trap 今天在写一个新项目的时候,使用cocoapods在执行 $ pod ins ...

  2. osx升级到10.10后,使用pod install报错解决的方法

    先看下网上的解决方法例如以下: 先依照这个文章做:http://blog.csdn.net/dqjyong/article/details/37958067 大概过程例如以下: Open Xcode ...

  3. osx升级到10.10后,用pod install报错终于解决的方法

    先依照这个文章做:http://blog.csdn.net/dqjyong/article/details/37958067 大概过程例如以下: Open Xcode 6 Open Preferenc ...

  4. pod install报错问题解决

    pod installwarning: Insecure world writable dir /usr/local/bin in PATH, mode 040777报错后就不进行了.查stackov ...

  5. pod install报错 [!] Error installing......

    今天pod install出现这个错误: 解决办法: 多试几次就好了,也不知道之前几次都失败.....希望知道的可以留言告诉我哟!!!

  6. React Native pod install报错 `Yoga (= 0.44.3.React)` required by `React/Core (0.44.3)`

    使用pod安装,可能会因为Podfile的路径指向错误或者没有路径指向因为报错. 报错截图如下: 这是因为在指定的路径没有寻找到相应的组件.此时就需要修改podfile文件中的路径,由于上方提示没有  ...

  7. Mac升级系统后 Pod Install报错-不能用 解决办法

    brew reinstall cocoapods brew install ruby brew link --overwrite cocoapods 最近将Mac OS升级到10.15.1 ,再回来初 ...

  8. pod install 报错

    更新pod出现如下警告 The `SmartCloud_TS [Debug]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build se ...

  9. jenkins执行 pod install 报错 CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile:

    错误提示是: CocoaPods 需要终端使用utf-8编码 解决办法

随机推荐

  1. Jenkins User on Apt-Get Install Installation

    转自:http://stackoverflow.com/questions/6234016/jenkins-user-on-apt-get-install-installation QUESTION: ...

  2. 如何使java中double类型不以科学计数法表示

    在java中,把一个double或者BigDecimal的小数转换为字符串时,经常会用科学计数法表示,而我们一般不想使用科学计数法,可以通过:DecimalFormat a = new Decimal ...

  3. Qt 多线程学习

    最近的项目上用到了关于多线程的知识,自己也比较感兴趣,所以就拿了那本<C++ GUI Qt4 编程>来学习. 这本书的第14章是关于多线程的知识,使用的Qt版本是Qt4.x.在下用的是最新 ...

  4. C++类的构造、拷贝构造、析构函数等

    1: 一个空的class在C++编译器处理过后就不再为空,编译器会自动地为我们声明一些member function,如果你写 class A{}; 编译器处理后,就相当于: class A{ pub ...

  5. ffmepg 指定RTSP网络连接模式UDP还是TCP

    AVFormatContext *formatCtx = NULL; formatCtx = avformat_alloc_context(); AVDictionary* options = NUL ...

  6. 转载:浅析Java中的final关键字

    谈到final关键字,想必很多人都不陌生,在使用匿名内部类的时候可能会经常用到final关键字.另外,Java中的String类就是一个final类,那么今天我们就来了解final这个关键字的用法.下 ...

  7. Delphi 编译错误信息表

    ; not allowed before ELSE ElSE前不允许有“;” <clause> clause not allowed in OLE automation section 在 ...

  8. Iwpriv工作流程及常用命令使用

    iwpriv工具通过ioctl动态获取相应无线网卡驱动的private_args所有扩展参数 iwpriv是处理下面的wlan_private_args的所有扩展命令,iwpriv的实现上,是这样的, ...

  9. 硬盘结构介绍--mbr及分区

    硬盘刚买来使用时需要经过分区然后格式化才能够使用,硬盘经过分区后,分区软件便会写一个主引导扇区,这个扇区位于硬盘的 0 磁道 0 柱面第1扇区(即0区)(注意:该扇区为隐含扇区,0道0面的全部扇区均为 ...

  10. hdu 3948(后缀数组+RMQ)

    题意:求一个串中有多少不同的回文串. 分析:这一题的关键是如何去重,我表示我现在还没理解为什么这样去重,先放这里过两天再看!! //不同回文子串数目 #include <iostream> ...