美文网首页
CocoaPods.

CocoaPods.

作者: 猪队友小L | 来源:发表于2017-08-18 17:12 被阅读7次

    关于更新CocoaPods

    最近从gitHub上下载了一些demo,然后pod install 发现都报同一个错误:[!] Unable to find a specification for XXXXXX


    经过仔细寻找答案后发现是CocoaPods版本的原因:
    解决办法

    pod repo remove master
    pod setup
    pod install
    
    

    CocoaPods常见问题

    目录权限不够报错

    ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory. 
    
    

    解决,修改权限
    sudo chmod 777 /Library/Ruby/Gems/2.0.0


    更新cocoapods权限问题

    gem install rails
    
    Fetching: activesupport-4.2.4.gem (100%)
    
    ERROR:  While executing gem ... (Errno::EACCES)
    
    Permission denied - /Library/Ruby/Gems/2.0.0/cache/activesupport-4.2.4.gem
    

    解决
    sudo gem install cocoapods


    gem需要更新报错

    ERROR: While executing gem … (Errno::EACCES) 
    Permission denied - /Library/Ruby/Gems/2.0.0/cache/i18n-0.7.0.gem 
    
    

    解决
    gem update –system


    CocoaPods版本低

    pod search XXX 库版本低于 Github 上库最新版本
    

    参考链接
    pod search XXX 库版本低于 Github 上库最新版本 - 简书http://www.jianshu.com/p/cf6927342572


    更新CocoaPods版本

    sudo gem install -n /usr/local/bin cocoapods


    pod setup失败-提示错误信息

    pod setup失败-提示错误信息:

    [!] /usr/local/bin/git fetch --unshallow
    
    fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': transfer closed with outstanding read data remaining
    
    

    参考链接
    执行pod setup很慢很慢解决方案 - 简书http://www.jianshu.com/p/43a268ba8f47


    [toc]

    相关文章

      网友评论

          本文标题:CocoaPods.

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