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
http://blog.csdn.net/dqjyong/article/details/37958067
http://stackoverflow.com/questions/24018355/cocoapods-with-xcode-6-and-10-10-yosemite
上面这些都是网上用的些方法。
在来说说我自己的方法。事实上造成这样的情况是由于xocde升级到了6.1。而没有下载相相应的command_line_tools的工具。仅仅要到官方下载command_line_tools_for_osx_10.10_for_xcode_6.1.dmg这个,安装就能够了。
在使用pod install 就不会出现之前的问题了。
只是会提示你升级cocoapods,如图:
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXVhbnFpbnlhbmc=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">
你能够升级,这个最好还是碍你使用。
升级方法:
sudo
gem install cocoapods
osx升级到10.10后,使用pod install报错解决的方法的更多相关文章
- Xcode8 pod install 报错 “Generating Pods project Abort trap
Xcode8 pod install 报错 "Generating Pods project Abort trap 今天在写一个新项目的时候,使用cocoapods在执行 $ pod ins ...
- osx升级到10.10后,用pod install报错最终解决办法
转载自:http://blog.csdn.net/liuyujinglove/article/details/40582197 http://blog.csdn.net/dqjyong/article ...
- osx升级到10.10后,用pod install报错终于解决的方法
先依照这个文章做:http://blog.csdn.net/dqjyong/article/details/37958067 大概过程例如以下: Open Xcode 6 Open Preferenc ...
- pod install报错问题解决
pod installwarning: Insecure world writable dir /usr/local/bin in PATH, mode 040777报错后就不进行了.查stackov ...
- 导入项目后,js文件报错解决方法
导入项目后,发现 js文件报错,但是js文件是从官网下载的.解决办法: 选中报错的js文件, 右键选择 MyEclipse-->Exclude From Validation : 然后继续右键执 ...
- pod install报错 [!] Error installing......
今天pod install出现这个错误: 解决办法: 多试几次就好了,也不知道之前几次都失败.....希望知道的可以留言告诉我哟!!!
- 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 ,再回来初 ...
- cognos 10.2.2 导入samples数据源报错解决
操作系统:windows 2008R2 X64 数据库:oracle 10.2.0.1 X32 sid:cognosdb86 安装完samples后,执行IBM安装目录webcontent\sampl ...
随机推荐
- Java编程的逻辑 (34) - 随机
本系列文章经补充和完善,已修订整理成书<Java编程的逻辑>,由机械工业出版社华章分社出版,于2018年1月上市热销,读者好评如潮!各大网店和书店有售,欢迎购买,京东自营链接:http:/ ...
- 一步一步学习IdentityServer3 (3)
在上一篇中配置一个基础的idrserver服务端 这篇文章将对服务端做一些变化,这里我先贴一下上一章中的代码 证书: static class Certificate { public static ...
- Taints和Tolerations联用,将pod部署到k8s的master节点
一般,k8s的master为了保持高性能,在这个主节点上只运行一些管理必须的POD. 如果我们限于资源,或是一些监控类的pod要部署到master节点呢? 昨天遇到这个问题,按网上通用的方法,未解决, ...
- All Friends 极大团
搞懂了什么是团 什么是极大团 什么是最大团 极大团就是 不是任何团的真子集 最大团就是点数最多的极大团 这题就是求极大团的个数 用bk算法 #include <iostream> ...
- chrome书签(收藏栏)的导入导出
- redis 使用管道提升写入的性能[pipeline]
看了手册的都知道multi这个命令的作用就好比是mysql的事务的功能,但是大家都知道事务吗,就是在操作的过程中,把整个操作当作一个原子来处理,避免由于中途出错而导致最后产生的数据不一致,而产生BUG ...
- CentOS 7下升级MySQL5.7.23的一个坑
发现CentOS 7下升级MySQL5.7.23的一个坑,以前面升级到MySQL 5.7.23的一个集群为例 在我们环境下打开文件描述符个数的参数open_files_limit在MySQL 5.6. ...
- bzoj 1455 可并堆+并查集
一个堆和一个并查集对应,并且满足并查集中所有没有死的人等于堆中的人 /************************************************************** Pr ...
- hdu 5826 physics 物理题
physics 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5826 Description There are n balls on a smoo ...
- 【转】InitializingBean的作用
原文链接:http://blog.csdn.net/maclaren001/article/details/37039749 最近工作需要得到sping中的每个事物需要执行的sql,称机会简单研究了一 ...