美文网首页iOS开发.iOS学习iOS开发
Cocoapods 常出现的问题总结

Cocoapods 常出现的问题总结

作者: caixin | 来源:发表于2016-10-19 13:55 被阅读265次

    CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`


    解决办法

    先删除全局的缓存:

    $ sudo rm -fr ~/Library/Caches/CocoaPods/

    $ sudo rm -fr ~/.cocoapods/repos/master/                                                                            

    再执行:

    $ sudo gem install cocoapods    

    $ pod setup

    如果还是出现该问题则清空当前Pods目录然后再安装:   

    $ sudo rm -fr Pods/                                                           

    [!] The `master` repo requires CocoaPods 1.0.0 -  (currently using 0.39.0)     


    更新CocoaPods后问题解决         

    [!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --depth=1                    


    解决办法:执行 $sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer (-switch 后面加上你的Xcode.app包内容里的Developer的文件夹路径即可)


    [!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master

    Cloning into 'master'...

    fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': SSLRead() return error -9806


    解决方法:clone Specs 到repos目录下面

    $  cd  ~/.cocoapods/repos

    git clone https://github.com/CocoaPods/Specs.git

    如果pod setup 依然失败,找到一个安装好了cocoapods的Mac电脑,在~/.cocoapods/repos目录下面拷贝出master文件到自己的Mac上的相应位置

    ERROR:  While executing gem ... (Errno::EPERM)    Operation not permitted - /usr/bin/xcodeproj  


    $ sudo gem install cocoapods 时出现此问题

    解决方法:sudo gem install -n /usr/local/bin cocoapods --pre

    [!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master

    Cloning into 'master'...

    error: RPC failed; result=56, HTTP code = 200

    fatal: The remote end hung up unexpectedly

    fatal: early EOF


    pod setup 时出现此问题;

    解决方案一:

    $ cd ~/.cocoapods/repo

    $ git clone "https://github.com/CocoaPods/Specs"

    解决方案二:

    $ git config http.postBuffer 524288000


    相关文章

      网友评论

        本文标题:Cocoapods 常出现的问题总结

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