解压缩错误“未找到中央目录结尾签名”

Wil*_*ken 4 zip docx microsoft-word libreoffice

我有一个在 Windown/MS Word 中打开的 ZIP 文件(实际上它是一个 .DOCX 文件)。使用 LibreOffice / Mac 打开它会产生:

General Error.
General input/output error.
Run Code Online (Sandbox Code Playgroud)

File说:

../Commission Plan.docx: Zip archive data, at least v2.0 to extract
Run Code Online (Sandbox Code Playgroud)

unzip说:

Archive:  ../Commission Plan.docx
  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.
unzip:  cannot find zipfile directory in one of ../Commission Plan.docx or
  ../Commission Plan.docx.zip, and cannot find ../Commission Plan.docx.ZIP, period.
Run Code Online (Sandbox Code Playgroud)

我如何打开这个文件?

Wil*_*ken 5

使用此备用压缩过程来恢复文件的损坏。(想法基于https://askubuntu.com/questions/54904/unzip-error-end-of-central-directory-signature-not-found的答案)

mkdir DOCX
cd DOCX
jar xvf ../Commission\ Plan.docx
jar cvf ../Commission\ Plan2.docx *
Run Code Online (Sandbox Code Playgroud)

这将使用系统上 java 运行时内置的高级 zip 实用程序来解压缩和重新压缩。