need PK compat. v4.5 (can do v2.1)

If you are getting this error need PK compat. v4.5 (can do v2.1) from unzipping a zip file in command line, or been stuck in the zip cpgz cycle, the reason is that the zip file was created by PKZIP, but the unzip binary in osx cannot uncompress that.

All you need is to install p7zip.

brew install p7zip

If you got permission issues Could not link p7zip. Unlinking…, then you will need to temporarily open up some of your directories.

sudo chmod 777 /usr/local/bin/
sudo chmod 777 /usr/local/share/man/man1/
sudo chmod 777 /usr/local/lib

brew link p7zip

sudo chmod 755 /usr/local/bin
sudo chmod 755 /usr/local/share/man/man1/
sudo chmod 755 /usr/local/lib/

Now you should be able to uncompress your zip file in command line.

7za x your_file.zip 

P.S. Try the Unarchiver if you prefer having an application instead of using the command line.

11 thoughts on “need PK compat. v4.5 (can do v2.1)

  1. MG says:

    Thanks buddy. You saved my day with this article! I was stucking into cpgz cycle, and your article helped me a lot! Thank you very much!

    Like

Leave a comment