安装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/ --remove https://rubygems.org/
$ sudo gem install cocoapods 今天再使用的时候,在一个项目下执行pod install时半天死活没反应,无奈就ctrl+c了强制退出了。然后再执行的时候就出现错误:
Library/Ruby/Site/2.0.0/rubygems/dependency.rb:318:in `to_specs': Could not find 'cocoapods' (>= 0) among 33 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/xianlong/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', execute `gem env` for more information
from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:327:in `to_spec'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /usr/local/bin/pod:22:in `<main>'
分析可能是因为强制退出程序导致的配置被损坏。于是把pod卸载,重新安装后就ok了。
卸载Pod:
step1:
which pod: 查看pod命令所在路径,比如为/usr/local/bin/pod,然后执行 rm -rf /usr/local/bin/pod 将pod命令移除
step2:
执行gem list | grep cocoapods 查看所有与cocoapods相关的已安装的组件,然后挨个卸载
我这里的执行结果是:
cocoapods-core (0.39.0)
cocoapods-downloader (0.9.3)
cocoapods-plugins (0.4.2)
cocoapods-search (0.1.0)
cocoapods-stats (0.6.2)
cocoapods-trunk (0.6.4)
cocoapods-try (0.5.1)
然后我就挨个执行:
gem uninstall cocoapods-core
gem uninstall cocoapods-downloader
gem uninstall cocoapods-plugins
gem uninstall cocoapods-search
gem uninstall cocoapods-stats
gem uninstall cocoapods-trunk
gem uninstall cocoapods-try
step3: 重新安装pod
执行sudo gem install cocoapods, 提示出错:While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
在命令中指定安装到/usr/bin/pods下即可正常安装成功:
sudo gem install -n /usr/local/bin cocoapods
安装成功,
step4: 查看新安装的pod版本:
pod --version
0.39.0
安装Pod时提示ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod的更多相关文章
- ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
因为突然要用到cocospod,突然发现在使用pod install的时候出现 -bash: pod: command not found 我去-不知道为什么,然后我就想重新安装下cocospod,在 ...
- 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 可以尝试使用以下指令进 ...
- 终端中出现While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod错误的修改方法
把输入终端的sudo gem install cocoapods改为 sudo gem install -n /usr/local/bin/ cocoapods即可
- CocoaPod升级(以及ERROR: While executing gem ... (Errno::EPERM)解决办法)
最近pods 0.39.0 升级1.1.1 ,发现一个坑,好纠结,好歹最后解决了 过程如下: 本来我想直接执行: $ sudo gem install cocoapods // 安装cocoap ...
- 安装Cocoapods时候ERROR: While executing gem ... (Errno::EPERM)
OS X 10.11 安装Cocoapods 出现问题的解决方法 今天尝试用 Cocoapods安装个第三方库.. 输入pod install, 发现 command not find. WTF! 估 ...
- cocoods 出现下面的问题:ERROR: While executing gem ... (Errno::EPERM)
今天安装cocoods 出现下面的问题:ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /us ...
- Operation not permitted - /usr/bin/pod
问题描述:执行sudo gem install cocoapods, 提示出错:While executing gem ... (Errno::EPERM) Operation not per ...
- ubuntu安装nginx时提示error: the HTTP rewrite module requires the PCRE library
ubuntu安装nginx时提示error: the HTTP rewrite module requires the PCRE library 须要安装pcre包. sudo apt-get upd ...
- 安装cocoa pods时出现Operation not permitted - /usr/bin/xcodeproj的问题
安装cocoa pods时, 在命令行中输入: 安装:sudo gem install cocoapods报Operation not permitted - /usr/bin/xcodeproj这个 ...
随机推荐
- MyBatis 注解使用动态SQL
使用MyBatis很长时间了,一直使用的是XML配置的 SQL,刚好在上一个项目中尝试使用注解方式开发,主要是由于XML配置过于繁琐,注解可以直接写在Mapper函数上,更加的方便一些. 在注解上不能 ...
- eclipse中配置tomcat
配置eclipse中的tomcat非常简单,之前以为windows下和mac中可能会不一样,但是经过配置发现是一样的: 下面就是在eclipse中简单的配置tomcat如下(mac和windows中都 ...
- grep 常用参数详解
grep常用参数详解 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 刚刚和同事打完球,虽然自己输了~不过也蛮好玩的,好久没有玩过乒乓球啦,话说你喜欢玩乒乓球吗?好啦,话不多说说,让 ...
- 在Unity中如何取得一个Box的Bounds
private BoxCollider mCollider; // Use this for initialization void Start () { mCollider = GetCompone ...
- 让Docker容器使用静态独立的外部IP(便于集群组建)
需要使用Docker虚拟化Hadoop/Spark等测试环境,并且要可以对外提供服务,要求是完全分布式的部署(尽量模拟生产环境).那么我们会遇到几个问题: Container IP 是动态分配的 Co ...
- 使用Redis分布式队列
1.这是处理异常的类 public class MyExceptionAttribute:HandleErrorAttribute { //public static Queue<Excepti ...
- 在学Go语言
首发:个人博客,更新&纠错&回复 开始学点儿Go语言,这语言据说在国内比在国外火,社区上褒贬不一,不过“小马过河”嘛,总要先自己试试再来下结论. 环境准备: 1.在Golang中国下载 ...
- pageX/Y, offset(), position(), scrollTop(), screenX/Y, clientX/Y, pageX/Y
event.pageX get mouse position Description: The mouse position relative to the left edge of the docu ...
- [转] C语言常见笔试题大全1
点击阅读原文 1. 用预处理指令#define 声明一个常数,用以表明1年中有多少秒(忽略闰年问题) #define SECONDS_PER_YEAR (60 * 60 * 24 * 365UL) [ ...
- dynamics_cast<>
#include <iostream> class A { public: A(){} ~A(){} ;} }; class B:public A { public: B(){} ~B() ...