Processing
 

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

07/02/2015 14:19#1

Joined at: 11 months ago

Post: 7

Thank: 0

Thanked: 0

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??

07/02/2015 15:03Top#2

eckes

Member

Joined at: 11 months ago

Post: 8

Thank: 0

Thanked: 0

I think it is "normal" that info-zip's unzip6.0 can only work with ZIP Entries which use the 4.6 version. This describes the features needed to uncompress it. The latest addition in unzip 6.0 is bzip2, which is represented in version 4.6. The 5.1 version you get when you use the (AES) strong encryption feature.

You need to use alternative tools like the mentioned 7zip (or the commercial pkunzip) to unpack those files. When you can influence the creation process, then play around with the features you use and which not (i.e. do not ask for strong password encryption if you want to be compatible with legacy infozip tool).

And yes, this is somewhat unfortunate. And I think the unzip is ported to so many target platforms, that nobody wants to work on it anymore .)

21/07/2016 17:50Top#3

Joined at: 7 months ago

Post: 1

Thank: 0

Thanked: 0

Use 7z from p7zip-full package in Debian:

$ 7z x test.zip

Similar articles

Non-interactive method for dpkg-reconfigure tzdata

5 years ago - Reply: 3 - Views: 142

monit is not able to read mongod.lock

2 years ago - Reply: 3 - Views: 139

Ubuntu: hadoop command not found

2 years ago - Reply: 4 - Views: 244

C# Mono Console.ReadLine quitting

4 years ago - Reply: 1 - Views: 87

linking jsoncpp on Ubuntu

2 years ago - Reply: 1 - Views: 6

Build artifacts over ssh jenkins - PHP

2 years ago - Reply: 1 - Views: 38

Can't load Metasploit after installation

3 years ago - Reply: 5 - Views: 222

Selenium FirefoxDriver in Headless get error

2 years ago - Reply: 1 - Views: 96

Unable to start MongoDB. ERROR: addr already in use

2 years ago - Reply: 2 - Views: 120

ZSH Agnoster Theme showing machine name

2 years ago - Reply: 4 - Views: 248

Unable to start firefox browser with jenkins user

2 years ago - Reply: 2 - Views: 111

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re