ios - 在虚拟机上安装 CocoaPods
<p><p>我正在使用 OS X El Capitan,版本 10.11.4 使用 VMWare</p>
<p>我可以使用 <code>sudo gem install cocoa pods</code></p> 安装 gem
<p>我想在我的项目中使用 <code>Firebase</code> 并遵循官方网站上提到的指南。</p>
<p>在安装 pod 时,我收到以下错误</p>
<pre><code>pod install --verbose
Preparing
Setting up CocoaPods master repo
Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into 'master'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
(/usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into 'master'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
)
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:35:in `rescue in find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:38:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:654:in `block in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:144:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:114:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
</code></pre>
<p><strong>到目前为止我已经尝试过什么</strong> </p>
<p>去 ~/.cocoapods/repos 并执行以下命令 </p>
<pre><code>git clone https://github.com/CocoaPods/Specs.git master
</code></pre>
<p>出现错误</p>
<pre><code>Cloning into 'master'...
remote: Counting objects: 798955, done.
remote: Compressing objects: 100% (26/26), done.
~/.cocoapods/repos 9% (73183/798955), 14.57 MiB | 113.00 KiB/s
</code></pre>
<p>在上面一行之后它永远挂起,事件监视器上没有网络事件</p>
<p>此外,我通过执行增加了缓冲区大小</p>
<pre><code>git config --global http.postBuffer 157286400
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>这是一个连接问题。
要解决此问题,您必须转到 VM 设置来桥接物理连接。</p>
<p>VMware Player-->可移动设备-->网络适配器-->设置</p>
<p>你会发现网络连接并检查两者</p>
<p>桥接:直接连接到物理网络</p>
<p>复制物理网络连接状态(如果您使用的是笔记本电脑)。</p>
<p>查看以下链接了解详情:</p>
<p> <a href="https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-826323AD-D014-475D-8909-DFA73B5A3A57.html" rel="noreferrer noopener nofollow">https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-826323AD-D014-475D-8909-DFA73B5A3A57.html</a> </p></p>
<p style="font-size: 20px;">关于ios - 在虚拟机上安装 CocoaPods,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/39199348/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/39199348/
</a>
</p>
页:
[1]