Error trying to unzip file: "need PK compat. v6.1 (can do v4.6)"

I received a zip file from a bank. I get the following error when I trying to unzip it.

unzip filename.zip 
Archive:  filename.zip
   skipping: SOME_STUFF.pdf  need PK compat. v6.1 (can do v4.6)

The file command returns

Zip archive data

for this file.

There are a fair number of threads containing this error message, but the only concrete suggestions they have is to use 7z x or 7za x from the p7zip-full package. These fail with the error:

Unsupported Method

Sub items Errors: 1

I’m using Debian wheezy amd64. I don’t see significant updates of the unzip or 7za packages in testing/unstable though.

I’d appreciate suggestions of how to unzip this file, and more generally, what does the error message PK compat. v6.1 (can do v4.6) mean? For a widely used utility, zip does not have much documentation available about it. The README in the Debian sources points to http://www.info-zip.org/pub/infozip/ which lists a release dated of 29th April 2009 for UnZip 6.0.

Here is the version output for the unzip binary on my system.

unzip -v
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 4.7.2 for Unix (Linux ELF) on Feb  3 2015.

UnZip special compilation options:
        ACORN_FTYPE_NFS
        COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
        SET_DIR_ATTRIB
        SYMLINKS (symbolic links supported, if RTL and file system permit)
        TIMESTAMP
        UNIXBACKUP
        USE_EF_UT_TIME
        USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
        USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
        UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
        LARGE_FILE_SUPPORT (large files over 2 GiB supported)
        ZIP64_SUPPORT (archives using Zip64 for large files supported)
        USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
        VMS_TEXT_CONV
        WILD_STOP_AT_DIR
        [decryption, version 2.11 of 05 Jan 2007]

UnZip and ZipInfo environment options:
           UNZIP:  [none]
        UNZIPOPT:  [none]
         ZIPINFO:  [none]
      ZIPINFOOPT:  [none]

dpkg reports the package version as 6.0-8+deb7u2.

The output of zipinfo is:

zipinfo filename.zip 
Archive:  filename.zip
Zip file size: 6880 bytes, number of entries: 1
-rw-a--     6.4 fat    10132 Bx defN 15-Feb-06 16:24 SOME_STUFF.pdf
1 file, 10132 bytes uncompressed, 6568 bytes compressed:  35.2%
Asked By: Faheem Mitha

||

Origin of the error

The PK in the error stands for Phil Katz, the inventor of the original PKZIP format. The zip utility has not kept up with the capabilities of the pkzip derived commercial software, particularly the certificate storage that banks like to include in their ZIP files.

Wikipedia gives an overview of the development of the format. But the Unix zip utilities don’t implement the changes after the year 2002.

You might have to buy the PKWARE commercial version for Linux to uncompress this.

The man page for zip has the following to say for itself and unzip:

   A  companion  program  (unzip(1))  unpacks  zip  archives.  The zip and
   unzip(1) programs can work with archives produced by PKZIP  (supporting
   most PKZIP features up to PKZIP version 4.6), and PKZIP and PKUNZIP can
   work with archives produced  by  zip  (with  some  exceptions,  notably
   streamed  archives,  but  recent  changes  in the zip file standard may
   facilitate better compatibility).  zip version 3.0 is  compatible  with
   PKZIP  2.04  and  also supports the Zip64 extensions of PKZIP 4.5 which
   allow archives as well as files to exceed the previous 2 GB limit (4 GB
   in  some  cases).  zip also now supports bzip2 compression if the bzip2
   library is included when zip is compiled.  Note that PKUNZIP 1.10  can‐
   not extract files produced by PKZIP 2.04 or zip 3.0. You must use PKUN‐
   ZIP 2.04g or unzip 5.0p1 (or later versions) to extract them.

Solution

Although zip cannot do the job there are other tools that can. You mention the 7zip utility and the Linux/Unix commandline version of 7-Zip that, among others can read and write ZIP format. It claims that if 7-Zip cannot read a zip file, that in 99% of the cases the file is broken. 7-Zip utilities should be able to read your file, so either it is broken or else yours are in the 1% (for which I found no further details).

7-zip on Linux comes in various executables with different format support. The most basic ( 7zr ), doesn’t support ZIP, you should use at least 7za or the full-fledged 7z:

7za x filename.zip

Different Linux version package 7za/7z in packages with different names.

The most easy (as so often) is installing on Solus:

sudo eopkg install p7zip

On Debian derived Linux version, the package p7zip only installs the base 7z that doesn’t support ZIP. This split-up has caused some problems and installing p7zip-full doesn’t do what it says, sometimes you also have to install p7zip-rar On my Linux Mint system I needed to do:

sudo apt-get install p7zip-full p7zip-rar

On RedHat/CentOS you need to have the EPEL repository enabled. E.g on CentOS 7 I needed to do:

sudo yum install epel-release
sudo yum --enablerepo=epel install p7zip
Answered By: Anthon

I ran in to the same problem except with PK compat. v6.3. Solved it by extracting the archive with the 7-zip POSIX version.

Arch Linux package: p7zip.

Answered By: Mandarin

I ran into the exact same error code (need PK compat. v6.1) while trying to unzip a zip file with the default MacOS unzipper.

I tried the p7zip and got kind of deep into it before checking the App Store.

In the App Store, I found a free unzipper app called “Unarchiver” (the first search result as of this writing) and it successfully unzipped the file without any problems.

For Mac users, I’d suggest using that free “Unarchiver” program.

Answered By: Jonathan Steele

My bank also uses a legacy commercial licenced version of WinZip (PKZIP) with a password, and I am unable to unzip their encrypted zip file in Linux.

need PK compat. v6.1 (can do v4.6)

Unfortunately the 7z (p7zip) solution mentioned in other answers didn’t work.

ERROR: Unsupported Method :

I am able to start a Windows 10 virtual machine (libvirt QEMU/KVM), and from there download and use a legacy version of WinZip https://www.winzip.com/en/download/legacy/ for example, winzip90.exe WinZip 9.0 SR-1 worked for my encrypted files.

Answered By: M.Viking

I got (Ubuntu 22.04.1 LTS):

need PK compat. v6.3 (can do v4.6)

And was able to extract the file using Python’s unzip library:

import zipfile
with zipfile.ZipFile('EPD_202209.ZIP', 'r') as zip_ref:
    zip_ref.extractall('.')
Answered By: Rony Armon
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.