Linux下unzip解压文件时报错并提示: End-of-central-directory signature not found.

1. 使用unzip解压从rapidjosn官网下载的zip格式文件时,解压不成功,并给出其错误提示为:

Archive:  rapidjson-master.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.
unzip:  cannot find zipfile directory in one of rapidjson-master.zip or
        rapidjson-master.zip.zip, and cannot find rapidjson-master.zip.ZIP, period.

解压命令: unzip rapidjson-master.zip

如下图所示:
Linux下unzip解压文件时报错并提示: End-of-central-directory signature not found._第1张图片

2. 网上说可能原因是文件没有上传完整或是还没有上传完,我试了几次,都是同样的错误,所以这个问题可以排除。因此,我们用jar命令来解析该rapidjson-master.zip文件。

lxg@Ubuntu:~/rapidJson$ jar xvf rapidjson-master.zip, 若提示:jar:Command not found,则ubuntun下使用:sudo apt-get install -f jar, radhat/centos使用yum -y install java-1.6.0-openjdk-devel安装jar工具。当jar工具安装完成后,再次执行:jar xvf rapidjson-master.zip

lxg@Ubuntu:~/rapidJson$ jar xvf rapidjson-master.zip 
  已创建: rapidjson-master/
  已解压: rapidjson-master/.gitattributes
  已解压: rapidjson-master/.gitignore
  已解压: rapidjson-master/.gitmodules
  已解压: rapidjson-master/.travis.yml
  已解压: rapidjson-master/CHANGELOG.md
  已解压: rapidjson-master/CMakeLists.txt
  已创建: rapidjson-master/CMakeModules/
  已解压: rapidjson-master/CMakeModules/FindGTestSrc.cmake
  已解压: rapidjson-master/RapidJSON.pc.in
  已解压: rapidjson-master/RapidJSONConfig.cmake.in
  已解压: rapidjson-master/RapidJSONConfigVersion.cmake.in
  已解压: rapidjson-master/appveyor.yml
  已创建: rapidjson-master/bin/
  已创建: rapidjson-master/bin/data/
  已解压: rapidjson-master/bin/data/glossary.json
  已解压: rapidjson-master/bin/data/menu.json
  已解压: rapidjson-master/bin/data/readme.txt
  已解压: rapidjson-master/bin/data/sample.json
  已解压: rapidjson-master/bin/data/webapp.json
  已解压: rapidjson-master/bin/data/widget.json
  已创建: rapidjson-master/bin/draft-04/
  已解压: rapidjson-master/bin/draft-04/schema
  已创建: rapidjson-master/bin/encodings/
  已解压: rapidjson-master/bin/encodings/utf16be.json
  已解压: rapidjson-master/bin/encodings/utf16bebom.json
  已解压: rapidjson-master/bin/encodings/utf16le.json
  已解压: rapidjson-master/bin/encodings/utf16lebom.json
  已解压: rapidjson-master/bin/encodings/utf32be.json
  已解压: rapidjson-master/bin/encodings/utf32bebom.json
  已解压: rapidjson-master/bin/encodings/utf32le.json
  已解压: rapidjson-master/bin/encodings/utf32lebom.json
  已解压: rapidjson-master/bin/encodings/utf8.json
  已解压: rapidjson-master/bin/encodings/utf8bom.json
  已创建: rapidjson-master/bin/jsonchecker/
已提取: rapidjson-master/bin/jsonchecker/fail1.json
  已解压: rapidjson-master/bin/jsonchecker/fail10.json
已提取: rapidjson-master/bin/jsonchecker/fail11.json
已提取: rapidjson-master/bin/jsonchecker/fail12.json
已提取: rapidjson-master/
....................省略若干行.......................

Linux下unzip解压文件时报错并提示: End-of-central-directory signature not found._第2张图片

你可能感兴趣的:(Linux应用开发)