安装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这个 ...
随机推荐
- 响应式布局1--媒体查询和-webkit-min-device-pixel-ratio
-webkit-min-device-pixel-ratio其实就是这个玩意 window.devicePixelRatio是设备上物理像素和设备独立像素(device-independent pix ...
- Leetcode: All O`one Data Structure
Implement a data structure supporting the following operations: Inc(Key) - Inserts a new key with va ...
- Coursera台大机器学习基础课程学习笔记2 -- 机器学习的分类
总体思路: 各种类型的机器学习分类 按照输出空间类型分Y 按照数据标记类型分yn 按照不同目标函数类型分f 按照不同的输入空间类型分X 按照输出空间类型Y,可以分为二元分类,多元分类,回归分析以及结构 ...
- 分列:将excel单元格的内容拆分为两列
提要:处理excel数据时有时需要把单元格的内容拆分为两列,可能方便外部软件的链接,可能使数据显示更明晰等等,有人说直接剪切加粘贴不就可以了吗,但是有时数据过多,这样处理很不效率,网上搜索的方法说插入 ...
- HttpClient请求返回JSON、图片
/** * Created by RongGuang on 2015/9/19. */ public class RongHttp { /** * Http Post请求 * @param url * ...
- [attribute=value] 匹配给定的属性是某个特定值的元素
描述: 查找所有 name 属性是 newsletter 的 input 元素 HTML 代码: <input type="checkbox" name="news ...
- Oracle数据库DOC命令导入导出(2014-3-10记)
导出:exp lwj/lwj123456@orcl file=d:/db.dmp full=y 导入:imp lwj/lwj123456@orcl file=d:/db.dmp full=y 注:用户 ...
- plsql和oracle错误记录
昨天oracle密码搞忘记了,根据网上方法弄了不管用,索性直接删掉数据库,然后重建,再次登陆的时候既然报错, 说我适配器错误,我靠,这是闹哪样,找了好多方法,都解决不了. 然后上班问一个oracle大 ...
- (转)函数调用方式与extern "C"
原文:http://patmusing.blog.163.com/blog/static/13583496020103233446784/ (VC编译器下) 1. CALLBACK,WINAPI和AF ...
- httpd服务安装
1.配置yum ps:详见YUM源设置篇 2输入yum install httpd -y 进行安装 3安装完成后,重启httpd服务 service httpd restart ...