71

When trying to unzip a file, I ghet the following error:

Archive:  file.zip
skipping: file.bla            need PK compat. v4.5 (can do v2.1)

Can any one help?

Pedro Cora
  • 813
  • 1
  • 6
  • 4
  • 2
    Try `7z x file.zip` [install info](http://p7zip.sourceforge.net/), I am pretty sure that error is related to password protected zips, which the built in doesn't really support. – nerdwaller Aug 01 '13 at 14:01

4 Answers4

110

Try to unzip it with p7zip.

You can install it via MacPorts or Homebrew with these commands, respectively:

sudo port install p7zip

brew install p7zip

Then, to unzip it, use:

7za x file.zip
Igor Hatarist
  • 2,171
  • 1
  • 17
  • 13
  • 15
    This works. I am just curious: does the `need PK compat. v4.5 (can do v2.1)` message mean that Info-ZIP (i.e. the standard `unzip`) can't read files in a newer format defined by PKWARE, or that this is in fact not a .zip file, but rather a 7z file? – avernet Nov 27 '13 at 17:57
  • @avernet then why Windows can do it and macOS not? Is macOS that bad? – user924 May 11 '19 at 19:54
  • 1
    I did use on macOS only `brew install p7zip` and `7za x file.zip` - all is working – Oleg Sapishchuk May 27 '20 at 02:55
  • this helped me too, mine was `need PK compat. v5.1 (can do v4.5)` just for google index. I also used brew. – xenoterracide Jan 29 '21 at 16:41
2

If you're emotionally attached to using the unzip command; this also works:

$ brew tap homebrew/dupes
$ brew install unzip
$ brew link unzip --force

# Warning: unzip is keg-only and must be linked with --force
# Note that doing so can interfere with building software.
Blaise
  • 286
  • 2
  • 10
  • as of 2021 "Error: homebrew/dupes was deprecated. This tap is now empty and all its contents were either deleted or migrated." – Criggie Jun 04 '21 at 01:34
0

If you're on an older Mac, XCode won't install without the latest OS. I just figured out that it works fine without Xcode or Homebrew, but you have to be comfortable running some terminal commands.

You can download 7za from SourceForge. It will show up as a 7za file with a terminal exec icon. Then copy it to /usr/local/bin and chmod +x /usr/local/bin/7za (I had to create the bin folder). Then type 7za x path/to/your/file.zip and it should work.

$ sudo mkdir -p /usr/local/bin
$ sudo cp /Volumes/p7zip/7za /usr/local/bin
$ sudo chmod +x /usr/local/bin/7za
$ 7za x path/to/your/file.zip
phpguru
  • 558
  • 5
  • 7
0

That file was zipped under Windows/Linux using 7zip and you are trying to unzip it under MacOS.

Download The Unarchiver from the App Store and use it to unzip it.