Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while unzipping a file in shell script. - need PK compat. v5.1 (can do v4.6)

I'm using unzip test.zip in a Shell script. But while executing this line i get an error

Archive:  test.zip
   skipping: hello.pdf                need PK compat. v5.1 (can do v4.6)

Even if i try to run this single command from the terminal in ubuntu it throws the same error need PK compat. v5.1 (can do v4.6)

Uninstalling and reinstalling unzip also didn't work. Alternately I had to install p7zip-full to unzip the test.zip file. How to fix this and use unzip in the shell script??

like image 503
Tejus Prasad Avatar asked Feb 07 '15 14:02

Tejus Prasad


2 Answers

Use 7z from p7zip-full package in Debian:

$ 7z x test.zip

like image 82
Nicolás Wolovick Avatar answered Nov 05 '22 21:11

Nicolás Wolovick


You can use p7zip to perform the required action. Use brew to install it.

$ brew install p7zip

use this to unzip a file

$ 7z x file.zip
like image 23
AshuGG Avatar answered Nov 05 '22 22:11

AshuGG