6

Whenever I try to install any of Google's cocoapods I get one of two errors.

Either:

$ 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)

Or:

$ 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.

I've been trying this with both new and existing objective-c projects and have tried uninstalling and re-installing cocoapods. Not really sure what the issue seems to be and Google doesn't have any troubleshooting for their cocoapods.

Richard
  • 61
  • 1
  • 2
  • If you download the archives manually, can you open them? If so, it would seem that CocoaPods unarchiving code is buggy and you'd want to report that to them. – Jon Shier Jul 14 '15 at 22:35
  • I can download them manually and open them, but was having trouble adding them to my project. Regardless, it's not a long term maintainable solution. I could try cutting an issue on their podfile specification on github but there doesn't seem to be a central point of contact for these kinds of issues. – Richard Jul 14 '15 at 22:37
  • Just install it with the `--pre` option? Google makes everything beta/prerelease. That probably won't change when the publish stuff to CocoaPods. – brandonscript Jul 14 '15 at 23:05
  • Tried that as well. That's just a cocoapods thing and doesn't affect the google pods. – Richard Jul 15 '15 at 17:10
  • check this [post](https://stackoverflow.com/a/48124681/4797289), you need just use VPN. – Rasoul Miri Jan 06 '18 at 05:49

4 Answers4

20

Try updating your gem

sudo gem update -n /usr/local/bin cocoapods
pod install
pkc456
  • 8,350
  • 38
  • 53
  • 109
RED
  • 374
  • 2
  • 6
1

Deleting podfile.lock and pod install fixed it for me.

Fawad Masud
  • 12,219
  • 3
  • 25
  • 34
0

I had the same issue and I did gem install cocoapods first then pod install worked fine.

Xirt
  • 1
  • 3
-1

After 6 hours i found this

go to http://cocoapods.org/ and download tar file

vijay
  • 10,276
  • 11
  • 64
  • 79