美文网首页
mac安装cocoapods新版本

mac安装cocoapods新版本

作者: 动哒APP | 来源:发表于2020-08-27 21:37 被阅读0次

    卸载

    AdministratordeMacBook-Air:~ administrator$ pod --version
    1.7.5
    AdministratordeMacBook-Air:~ administrator$ which pod
    /usr/local/bin/pod
    AdministratordeMacBook-Air:~ administrator$ sudo rm -rf /usr/local/bin/pod
    Password:
    

    安装

    AdministratordeMacBook-Air:bin administrator$ sudo gem install cocoapods
    Successfully installed cocoapods-1.9.3
    Parsing documentation for cocoapods-1.9.3
    Done installing documentation for cocoapods after 2 seconds
    1 gem installed
    AdministratordeMacBook-Air:bin administrator$ pod --version
    -bash: pod: command not found
    AdministratordeMacBook-Air:bin administrator$ 
    

    但是,运行pod命令,并没有这个命令。

    正确姿势:

    AdministratordeMacBook-Air:bin administrator$ sudo gem install -n /usr/local/bin cocoapods
    Successfully installed cocoapods-1.9.3
    Parsing documentation for cocoapods-1.9.3
    Done installing documentation for cocoapods after 2 seconds
    1 gem installed
    

    参考:https://www.jianshu.com/p/f43b5964f582

    相关文章

      网友评论

          本文标题:mac安装cocoapods新版本

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