【发布时间】:2015-07-14 22:34:02
【问题描述】:
每当我尝试安装任何 Google 的 cocoapods 时,都会遇到两个错误之一。
要么:
$ pod install
Analyzing dependencies
[!] The version of CocoaPods used to generate the lockfile (0.38.0.beta.2) is higher than the version of the current executable (0.37.2). Incompatibility issues may arise.
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing Google (1.0.7)
[!] Error installing Google
...
inflating: /var/folders/<myDirectory>/Samples/signin/SignInExampleSwift/ViewController.swift
warning [/var/folders/<myDirectory>/file.zip]: 375 extra bytes at beginning or within zipfile
(attempting to process anyway)
或者:
$ pod install
[in /Users/<user>/Desktop/FakeProject]
Analyzing dependencies
CocoaPods 0.38.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing AppInvites (1.0.1)
[!] Error installing AppInvites
[!] /usr/bin/tar xfz /var/folders/<myDirectory>/file.tgz -C /var/folders/<myDirectory>
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
我一直在尝试使用新的和现有的 Objective-c 项目,并尝试卸载和重新安装 cocoapods。不太确定问题出在哪里,Google 也没有针对他们的 cocoapods 进行任何故障排除。
【问题讨论】:
-
如果手动下载存档,可以打开吗?如果是这样,那么 CocoaPods 解压代码似乎有问题,您需要向他们报告。
-
我可以手动下载并打开它们,但无法将它们添加到我的项目中。无论如何,这不是一个长期可维护的解决方案。我可以尝试在 github 上解决他们的 podfile 规范中的问题,但似乎没有针对此类问题的中心联系点。
-
只需使用
--pre选项安装它?谷歌制作所有的测试版/预发布版。当将内容发布到 CocoaPods 时,这可能不会改变。 -
也试过了。这只是 cocoapods 的事情,不会影响 google pods。
-
检查这个post,你只需要使用VPN。
标签: ios objective-c cocoapods google-analytics-sdk