美文网首页
cocoapods 卸载|查看|安装

cocoapods 卸载|查看|安装

作者: 清风_____ | 来源:发表于2019-12-31 17:58 被阅读0次

    卸载Pod:

    step1:( 指令 which pod )

    which pod: 查看pod命令所在路径,比如为/usr/local/bin/pod,然后执行 rm -rf /usr/local/bin/pod 将pod命令移除

    step2:( 指令 gem list | grep cocoapods )

    执行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 )

    执行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

    相关文章

      网友评论

          本文标题:cocoapods 卸载|查看|安装

          本文链接:https://www.haomeiwen.com/subject/pukioctx.html