EPUBCheck RSC-002: container.xml missing
Updated:
EPUBCheck RSC-002 is a fatal error message: “Required META-INF/container.xml resource could not be found.” The archive has no META-INF/container.xml, the file that tells reading apps where the package document is. Without it the EPUB cannot be opened at all, so EPUBCheck stops with a fatal error.
The official message
Required META-INF/container.xml resource could not be found.
- 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
- The META-INF folder was left out when the book was zipped.
- The file is named or placed differently, such as meta-inf/Container.xml.
- The archive was built from inside the content folder instead of from the book's root.
How to fix it
- Add META-INF/container.xml with a rootfile whose full-path points to the package document, for example
<rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>. - 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). - Validate again.
When it's not this
If container.xml exists but points to a missing package document, that is PKG-020.
Terms used here
Other RSC messages
RSC-001File "…" could not be found.RSC-003No rootfile tag with media type "application/oebps-package+xml" was found in the container.RSC-004File "…" is encrypted, its content will not be checked.RSC-005Error while parsing file: …RSC-006Remote resource reference is not allowed in this context; resource "…" must be located in the EPUB container.RSC-006bResource "…" is located outside the EPUB Container; please check the resource is retrieved in scripted content.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.