zoukankan      html  css  js  c++  java
  • CocoaPod升级(以及ERROR: While executing gem ... (Errno::EPERM)解决办法)

    最近pods  0.39.0 升级1.1.1  ,发现一个坑,好纠结,好歹最后解决了

    过程如下:

    本来我想直接执行:

    $ sudo gem install cocoapods   // 安装cocoapods

    遇到一个错误:

    ERROR:  While executing gem ... (Errno::EPERM)

        Operation not permitted - /usr/bin/pod

     

    卧槽,这什么鬼?然后就找解决办法,各种升级命令都不行,无奈之下,就采取先卸载再安装了!

     

    ======================正文======================

    卸载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

    1.1.1 

  • 相关阅读:
    hadoop配置文件说明
    hadoop集群部署
    Linux iptables防火墙实用模板
    不容忽视的SQL注入式攻击
    字符串的加解密
    .NET程序集版本号的奥秘
    SQL Server 2005 数据库引擎的容量规范
    Microsoft Visual Studio Tools for the Microsoft Office system(3.0 版)
    How to: Display a Dialog Box for Selecting Entries from the Contacts Folder
    OpenID及其原理介绍
  • 原文地址:https://www.cnblogs.com/yajunLi/p/6154992.html
Copyright © 2011-2022 走看看