osx升级到10.10后,用pod install报错终于解决的方法
先依照这个文章做:http://blog.csdn.net/dqjyong/article/details/37958067
大概过程例如以下:
- Open Xcode 6
- Open Preferences
- Click the
Locationstab - Change the
Command Line Toolsversion toXcode 6.0 - Uninstall
cocoapods
a.$ sudo gem uninstall cocoapods - Install
xcodeproj
a.$ sudo gem install xcodeproj - Install
cocoapods
a.$ sudo gem install cocoapods - Run
pod --versionto verify that it worked
假设你运行到第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 process will likely take a while as this command clones the CocoaPods Specs repository
into ~/.cocoapods/ on your computer. [6]
至此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=1
Cloning into 'master'...
error: RPC failed; result=52, HTTP code = 0
fatal: The remote end hung up unexpectedly
/Library/Ruby/Gems/2.0.0/gems/claide-0.6.1/lib/claide/command.rb:304:in `handle_exception': undefined method `verbose?' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/claide-0.6.1/lib/claide/command.rb:284:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.6.1/lib/claide/command.rb:274:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/lib/cocoapods/command.rb:48:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/bin/pod:33:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>' "
以上操作步骤完毕后在进行:$ sudo gem install cocoapods
这时就成功了!
剩下的就是和曾经的一样在project文件夹下,建Podfile,运行pod install,打开xworkspace等,顺利完毕!
!。
參考博客:http://www.cnblogs.com/cwgk/p/3370949.html
osx升级到10.10后,用pod install报错终于解决的方法的更多相关文章
- Xcode8 pod install 报错 “Generating Pods project Abort trap
Xcode8 pod install 报错 "Generating Pods project Abort trap 今天在写一个新项目的时候,使用cocoapods在执行 $ pod ins ...
- CocoaPods中pod search报错的解决办法
pod search报错的原因: 每次使用pod search命令的使用会在该目录下生成一个search_index.json文件,会逐渐的增大,文件达到一定大小后,ruby解析里面的json字符就会 ...
- pod install报错 [!] Error installing......
今天pod install出现这个错误: 解决办法: 多试几次就好了,也不知道之前几次都失败.....希望知道的可以留言告诉我哟!!!
- osx升级到10.10后,使用pod install报错解决的方法
先看下网上的解决方法例如以下: 先依照这个文章做:http://blog.csdn.net/dqjyong/article/details/37958067 大概过程例如以下: Open Xcode ...
- osx升级到10.10后,用pod install报错最终解决办法
转载自:http://blog.csdn.net/liuyujinglove/article/details/40582197 http://blog.csdn.net/dqjyong/article ...
- pod install报错问题解决
pod installwarning: Insecure world writable dir /usr/local/bin in PATH, mode 040777报错后就不进行了.查stackov ...
- React Native pod install报错 `Yoga (= 0.44.3.React)` required by `React/Core (0.44.3)`
使用pod安装,可能会因为Podfile的路径指向错误或者没有路径指向因为报错. 报错截图如下: 这是因为在指定的路径没有寻找到相应的组件.此时就需要修改podfile文件中的路径,由于上方提示没有 ...
- Mac升级系统后 Pod Install报错-不能用 解决办法
brew reinstall cocoapods brew install ruby brew link --overwrite cocoapods 最近将Mac OS升级到10.15.1 ,再回来初 ...
- 静默安装oracle后,启动oem报错,解决方法!
一.手工重建EM Oracle 的gridcontrol 由两部分组成:dbcontrol 和repository. 我们可以对某一部分进行操作,也可以同时进行操作. 这里先看一个因为修改hostna ...
随机推荐
- 【带修莫队】【权值分块】bzoj3196 Tyvj 1730 二逼平衡树
这题用了三种算法写: 分块+二分:O(n*sqrt(n*log(n)) 函数式权值分块:O(n*sqrt(n)) 带修莫队+权值分块:O(n5/3) 结果……复杂度越高的实际上跑得越快……最后这个竟然 ...
- Problem M: 输出九九乘法表
#include<stdio.h> int main() { int n,i,j; scanf("%d",&n); n>=&&n<= ...
- Androids中数据库的使用SQLite
(一) 知识点: SQLite3支持的数据类型:NULL,INTEGER,REAL(浮点数字),TEXT(字符串文本),BLOB(二进制对象),虽然他支持的类型只有五种,但实际上sqlite3也接受v ...
- 转载:win10 下安装32位的Oracle 11g 客户端(问题:环境不满足最低要求)
1. 在安装文件夹中,找 stage->cvu->cvu_prereq.xml文件. 2. 用记事本打开其xml文件进行编辑,加下面一段保存. <OPERATING_SYSTEM R ...
- SpringBoot整合Quartz定时任务
记录一个SpringBoot 整合 Quartz 的Demo实例 POM.XML文件 <!-- 定时器任务 quartz需要导入的坐标 --> <dependency> < ...
- Array.apply 方法的使用
Array.apply(null, {length: 5}) length为特殊字段,意思是生成一个长度为5的数组,由于没赋值,所以都是undefined; 如果要赋值,可以这样 console.lo ...
- Coherence装载数据的研究-PreloadRequest
最近给客户准备培训,看到Coherence可以通过三种方式批量加载数据,分别是: Custom application InvocableMap - PreloadRequest Invocation ...
- django+celery+redis实现运行定时任务
0.目的 在开发项目中,经常有一些操作时间比较长(生产环境中超过了nginx的timeout时间),或者是间隔一段时间就要执行的任务. 在这种情况下,使用celery就是一个很好的选择. cele ...
- Centos6.5搭建RHCS集群-实现GFS+iSCSI网络共享存储
RHCS集群配置 需要用到的各组件功能:RHCS(Red Hat Cluster Suite):能够提供高可用性.高可靠性.负载均衡.存储共享且经济廉价的集群工具集合.LUCI:是一个基于web的集群 ...
- SpingMVC实现集合参数(Could not instantiate bean class [java.util.List])
需求,要求批量新增或者修改一个List,在springMVC中是不支持下面代码的写法: @RequestMapping(value = "/update", method = Re ...