安装Cocoapods时候ERROR: While executing gem ... (Errno::EPERM)
OS X 10.11 安装Cocoapods 出现问题的解决方法
今天尝试用 Cocoapods安装个第三方库.. 输入pod install, 发现 command not find。 WTF!
估计是升级10.11后Cocoapods被干掉了。
我输入 sudo gem install cocoa pods 之后,出现如下问题:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
- 1
- 2
我估计是gem版本没有更新。执行sudo gem update –system,又出现了错误
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/update_rubygems
- 1
- 2
在Stackoverflow上找到了解决方法:
因为知道gem版本过老的话也是不能成功下载cocoapods的,但是我现在又不能用sudo gem update –system来更新。后来我就直接去rubygems官网下载了最新的源码进行了安装。现在执行gem -v显示版本是2.4.8。
可以看我另外一篇文章,手动安装gem
可是问题又来了,这个时候去执行sudo gem install cocoapods,还是会出现上边的错误。
所以执行下边:
自定义GEM_HOME
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
1 gem installed
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ pod --version
0.38.2
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
GEM_PATH与GEM_HOME 的区别:
1.GEM_PATH provides the locations (there may be several) where gems can be found.
2.GEM_HOME is where gems will be installed (by default).(Therefore GEM_PATH should include GEM_HOME).
但是之后我pod install的时候又花式出错
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
- 1
- 2
我尝试按提示的方法
pod repo add master https://github.com/CocoaPods/Specs.git
- 1
然而还是有错..
[!] /usr/bin/git clone http://git.oschina.net/akuandev/Specs.git master
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
- 1
- 2
- 3
最后的解决方法:
sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developers
- 1
后面的地址你可以打开Xcode显示包内容,找到那个文件夹拖到终端里面比较不容易错。
最后终于修成正果..
至于一开始输入 sudo gem install cocoapods 没反应需要修改为淘宝镜像的问题,请百度Cocoapods参阅其它文章..
安装Cocoapods时候ERROR: While executing gem ... (Errno::EPERM)的更多相关文章
- Jekyll 安装权限问题 ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/jekyll
OS X El Capitan 新特性(System Integrity Protection or SIP)中加强了权限,但是可以对这里进行操作 /usr/local/bin 可以尝试使用以下指令进 ...
- CocoaPod升级(以及ERROR: While executing gem ... (Errno::EPERM)解决办法)
最近pods 0.39.0 升级1.1.1 ,发现一个坑,好纠结,好歹最后解决了 过程如下: 本来我想直接执行: $ sudo gem install cocoapods // 安装cocoap ...
- cocoods 出现下面的问题:ERROR: While executing gem ... (Errno::EPERM)
今天安装cocoods 出现下面的问题:ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /us ...
- ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
因为突然要用到cocospod,突然发现在使用pod install的时候出现 -bash: pod: command not found 我去-不知道为什么,然后我就想重新安装下cocospod,在 ...
- 安装Pod时提示ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
环境:OSX EI 10.11.1 昨天切换gem源后,招待pod安装没有任何问题,也可以正常用$ gem sources --add https://ruby.taobao.org/ --remov ...
- 【CocoaPods】ERROR: While executing gem ... Gem::DependencyError
今天安装 CocoaPods 时遇到了这个问题. ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dep ...
- 终端中出现While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod错误的修改方法
把输入终端的sudo gem install cocoapods改为 sudo gem install -n /usr/local/bin/ cocoapods即可
- CocoaPods安装/更新报错While executing gem ... (OpenSSL::SSL::SSLError)解决方案
今天给新买的MacBook Pro更新CocoaPods,结果上来就报错,出师不利. HeinocdeMacBook-Pro:~ Heinoc$ sudo gem update --system Pa ...
- ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
原文地址:https://www.zfanw.com/blog/error-while-executing-gem-gem-remote-fetch-error.html 我对命令行下安装 gem 包 ...
随机推荐
- 用 namspace 隔离 DHCP 服务 - 每天5分钟玩转 OpenStack(90)
Neutron 通过 dnsmasq 提供 DHCP 服务,而 dnsmasq 如何独立的为每个 network 服务呢? 答案是通过 Linux Network Namespace 隔离,本节将详细 ...
- AngularJS之Directive(三)
前言 angular核心部分如下图几大块,最重要的莫过于指令这一部分,本文将重点讲解指令这一部分,后续笔者将通过陆续的学习来叙述其他如:factory.service等,若有叙述错误之处,欢迎各位指正 ...
- The network bridge on device VMnet0 is not running
The network bridge on device VMnet0 is not running. The virtual machine will not be able to communic ...
- Linux安装Node.js
安装环境:Ubuntu:x86_64 Node.js 官网:https://nodejs.org 下载Node.js: wget https://nodejs.org/dist/v4.4.3/node ...
- ES6 - Note2:解构赋值
ES6的解构赋值就是利用模式匹配从按照一定模式的数组或者对象中提取值赋值给变量. 1.数组的解构赋值 在ES6以前,变量的赋值是直接指定的,以后可以这么来写,如下所示 let [a,b,c] = [1 ...
- 如何搭建Percona XtraDB Cluster集群
一.环境准备 主机IP 主机名 操作系统版本 PXC 192.168.244.146 node1 ...
- 【记录】ASP.NET URL 特殊字符
终极版 URL 编码,使用 Uri.EscapeDataString: string url = "C++ C#"; Console.WriteLine(Uri.EscapeDat ...
- php对表格进行批量操作如全选反选删除功能
<!DOCTYPE> <html> <head> <meta http-equiv="content-type" content=&quo ...
- WebLogic12.1.1中跨域问题的探讨以及几种常见中间件中跨域问题的解决方法
文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1.问题描述 扬州现场中最开始安装了中间件WebLogic12.1.1 ...
- C#设置文件权限
在开发中,我们经常会使用IO操作,例如创建,删除文件等操作.在项目中这样的需求也较多,我们也会经常对这些操作进行编码,但是对文件的权限进行设置,这样的操作可能会手动操作,现在介绍一种采用代码动态对文件 ...