Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I try to unzip a zip file, but got an error:

$ unzip COCR2_100.zip 
Archive:  COCR2_100.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
note:  COCR2_100.zip may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of COCR2_100.zip or
        COCR2_100.zip.zip, and cannot find COCR2_100.zip.ZIP, period.

I googled but didn't find a solution. I was wondering why it is and how I should fix it? Thanks!

The zip file can be downloaded from COCR2_100. It is an application, and here is its website http://users.belgacom.net/chardic/cocr2.html.

My OS is 10.10.

share|improve this question
I was able to download and extract the program without any problems using the mirror link. Perhaps your download is corrupt? here is my md5sum output on the file: a55352aac3193948478952dea33828ef /home/chuck/Desktop/COCR2_100.zip –  Ctuchik Jul 28 '11 at 20:10
If you md5sum the file and get the same result "a55352aac3193948478952dea33828ef" Then your download is good, but if it isn't EXACTLY the same, then your download is corrupt –  Ctuchik Jul 28 '11 at 20:11
@Ctuchik: Thanks! The mirror one is good. The original one is broken. –  Tim Jul 28 '11 at 20:44
np bud, glad i could be of service. –  Ctuchik Jul 28 '11 at 20:44
Use the more robust jar xvf archive.zip, or try to fix the archive with zip -F archive.zip -O archive-fixed.zip (or -FF, see man zip). –  Zaz Sep 27 '14 at 18:22

4 Answers 4

up vote 10 down vote accepted

The problem is exactly what it says. Unzip can't find the line of code that signals the end of the archive, so either:

  1. The archive is corrupt.
  2. It is not a .zip archive.
  3. There are more than 1 parts to the archive, but that doesn't seem possible to me. You should try the other mirror too. It worked for me.

P.S. Notice how the program is made for Windows. So you need Wine (from http://www.winehq.com or the Ubuntu Software Center) to run it.

share|improve this answer
It seems that "unzip" is not very robust and therefore cannot cope with corrupted (or incompletely downloaded) archives. –  loevborg May 9 '13 at 14:59

I think the guys/gals that responded to you is on the right track it is very well a corrupted file. If that is the case then try another mirror to download the file. Your may try to install rar by opening terminal sudo apt-get install rar which for a true zip file rar is a little overkill. However it does add support for other formats and allows you to extracts different file types.

share|improve this answer

Try this:

jar xvf COCR2_100.zip
share|improve this answer
@EliahKagan it is not, but the trick works –  Christoph Walesch Nov 28 '12 at 7:49
This magically worked for me. +1 –  Yahel Feb 1 '13 at 16:54
Java's jar uses the zip format internally, and it's not surprising that, one "unzipper" would handle corruption better than another. –  Lambart Sep 20 '13 at 20:29
Wow this is exactly what I was looking for! Should def be the accepted answer. Any idea why this works? –  Willem Ellis Jan 21 '14 at 0:10
I think this works for corrupt (or incompletely downloaded) files because the jar utility does not check for the End-of-central-directory signature before starting the extraction. If that really is the case, chances are you might not be able to extract every file and the utility might end with an error like Unexpected end of ZLIB input stream at the end. –  Chirag64 May 31 '14 at 19:45

I had a similar issue today and had some success with dd and gunzip. Try this:

dd if=corrupt.zip | gunzip -f > xx.csv

In my case I still got the "gunzip: stdin: unexpected end of file" error but at least I got some output to view.

share|improve this answer
I found that zcat corrupt.zip > xx.csv did almost exactly the same thing.... –  Wilf Jul 26 '14 at 17:30

protected by jokerdino May 9 '13 at 16:41

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.