linux服务器解压缩zip文件时报错End-of-central-directory signature not found

在向服务器上传一个windows上压缩的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。但这样的方式是成功处理过的。详细报错如下: 

kermit@user80:~/test_files$ sudo unzip google.zip 
Archive:  google.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:  google.zip.ZIP may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of google.zip or google.zip.ZIP, and cannot find google.zip.ZIP, period. 

    unzip的功能还是有些局限的,这里的解决办法就是看你在windows下使用的压缩软件,比如是使用7-zip还是使用的tar。我这里使用的是7-zip进行的文件压缩,网上有说使用jar进行解压的办法解决的,有说使用7-zip解压的办法解决的。经过使用,如果是用7-zip压缩的就使用以下方法解压缩:

#下载p7zip_9.13_src_all.tar.bz2压缩包解压安装
kermit@user80:~/ wget http://downloads.sourceforge.net/project/p7zip/p7zip/9.13/p7zip_9.13_src_all.tar.bz2?r=http://sourceforge.net/projects/p7zip/files/&ts=1283040874&use_mirror=voxel
kermit@user80:~/ tar -jxvf p7zip_9.13_src_all.tar.bz2
kermit@user80:~/ cd p7zip_9.13
kermit@user80:~/ makemake install
#安装完成,使用7za进行解压
kermit@user80:~/ 7za x data.zip 

    使用的非7-zip压缩的话如果出现问题就使用jar试试解决吧: 

kermit@user80:~/ jar xvf google.zip
jar:Command not found
kermit@user80:~/ yum -y install java-1.6.0-openjdk-devel
kermit@user80:~/ jar xvf google.zip
posted @ 2023-03-02 13:46  蘭亭客  阅读(3246)  评论(0编辑  收藏  举报