PKG-004
Updated:
EPUBCheck PKG-004 is a fatal error message: “Corrupted EPUB ZIP header.” The ZIP structure of the EPUB is damaged, so EPUBCheck cannot list or read its files.
The official message
Corrupted EPUB ZIP header.
- Default severity
- Fatal error. EPUBCheck could not continue checking this part of the EPUB. The file is invalid.
- EPUBCheck version
- 5.4.0
Typical causes
- A truncated download or transfer.
- A tool that wrote the ZIP incorrectly or was interrupted while writing it.
How to fix it
- Get a fresh copy of the EPUB or export it again from its source.
- Rebuild the archive with the mimetype file first and stored uncompressed, for example from the folder that contains the book:
zip -X0 book.epub mimetypeand thenzip -rX9 book.epub META-INF OEBPS(use your own folder names).
Terms used here
Other PKG messages
PKG-003Unable to read EPUB file header. This is likely a corrupted EPUB file.PKG-005The mimetype file has an extra field of length …. The use of the extra field feature of the ZIP format is not permitted for the mimetype file.PKG-006Mimetype file entry is missing or is not the first file in the archive.PKG-001Validating the EPUB against version … but detected version ….PKG-007The content of the mimetype file must be the string "application/epub+zip"…PKG-009The file name "…" contains characters that are not allowed in OCF file names: ….
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.