Archive:  demoApi.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 dis

在使用unzip解压 *.zip文件时,提示上面的错误,一般情况下,有两种可能导致该错误,

第一种:unzip命令无法打开它

第二种:该压缩包不完整

我们先来解决第一种:

对于unzip命令无效的情况,我们可以使用

用jar 来解
$ jar xvf abc.zip
  如果出现
jar:Command not found
  要用yum下载
$ yum -y install java-1.6.0-openjdk-devel
安装时间也就两三分钟
安装完毕再次运行
再次运行
$ jar xvf    *.zip

即可。

但多数并不是unzip不可用,而是出现了压缩包不完整的情况。

接下来,我们来看第二种情况,压缩包不完整

我的虚拟机是centos7,我直接把压缩包拖进虚拟机的,在解压的时候,碰到了上面的错误,在网上找答案,说是用jar解压即可,我就试了试,确实能解压,但是,内容不完整,,,,,,

于是,我看了下虚拟机里面的压缩包的大小,又看了看windows下的压缩包大小,尴尬了。。。。Windows下压缩包大概90M,拖进虚拟机后只有13M。。。。。

知道了原因所在,解决就有了方向,即得保证两压缩包大小一致

我这里使用的是  FileZilla   ,下载它,安装它,然后连接服务器,结果又报错了。。。

状态: 尝试连接“ECONNREFUSED - 连接被服务器拒绝”失败。

不过已经有前人遇到了,并替我们解决了,解决办法:

文件-->站点管理器中新建站点然后选择SFTP协议,输入用户名密码点击连接即可。

接着

面板

此时再把文件拖过去,就可以保证文件的大小一致性。

再次使用unzip即可。

总结:有时候问题的出现可能不是unzip不能用,而是文件本身的问题,好了,我又帮你解决了一个坑,省的你下载了jar,解压后才发现根本不是unzip的问题。先检查文件的完整性,再决定你是否真的需要jar,unzip这个锅背的莫名其妙啊。

Archive: ****** End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes的更多相关文章

  1. invalid END header (bad central directory offset) 异常解决方法

    今天版本升级时,一个ear包在传到aix下,weblogic后启动出现 invalid END header (bad central directory offset) 后来才发下是文件传输中出现了 ...

  2. win10 pro eclipse maven: Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:mav invalid END header (bad central directory offset)

    Error:Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:mav ... invalid E ...

  3. Error generating final archive: Unable to get debug signature key

    在调试程序时,发生下面的错误: Error generating final archive: Unable to get debug signature key 解决办法: 删除下面的文件: C:\ ...

  4. Hive:org.apache.hadoop.hdfs.protocol.NSQuotaExceededException: The NameSpace quota (directories and files) of directory /mydir is exceeded: quota=100000 file count=100001

    集群中遇到了文件个数超出限制的错误: 0)昨天晚上spark 任务突然抛出了异常:org.apache.hadoop.hdfs.protocol.NSQuotaExceededException: T ...

  5. rmmod: can't change directory to '/lib/modules': No such file or directory

    [root@iTOP-4412]# mount /dev/sda1 /mnt/udisk/ [root@iTOP-4412]# insmod /mnt/udisk/linux/hello.ko  [ ...

  6. CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp.

    微型电脑或嵌入式与电脑还是有点不同的,在微型电脑上ros indigo 版本下利用catkin编译如果你遇到如下错误: CMake error:System Error:No such file or ...

  7. [转载]rmmod: can't change directory to '/lib/modules': No such file or directory

    转载网址:http://blog.csdn.net/chengwen816/article/details/8781096 在我新移植的kernel(3.4.2)和yaffs2文件中,加载新编译的内核 ...

  8. maven导入项目时出现“Cannot read lifecycle mapping metadata …… invalid END header (bad central directory offset)pom”错误的解决方法

    出现该错误是因为jar包版本不匹配,比如linux上的jar包导入到windows上了.可以将.m2\repository的org.apache.maven.plugins删掉然后让maven重新下载 ...

  9. 【C# IO 操作】 Path 路径类 |Directory类 |DirectoryInfo 类|DriveInfo类|File类|FileInfo类|FileStream类

    Directory类 Directory类 是一个静态类,常用的地方为创建目录和目录管理. 一下来看看它提供的操作. 1.CreateDirectory 根据指定路径创建目录.有重载,允许一次过创建多 ...

随机推荐

  1. VSCode 快速生成.vue基本模板、发送http请求模板

    安装vscode 官网:https://code.visualstudio.com/ 安装 Vetur 插件,识别 vue 文件 插件库中搜索Vetur,点击安装,安装完成之后点击重新加载 新建代码片 ...

  2. 我们真的需要JWT吗?

    JWT(JSON Web Token)是目前最流行的认证方案之一.博客园.各种技术公众号隔三差五就会推一篇JWT相关的文章,真的多如牛毛.但我对JWT有点困惑,今天写出来跟大家探讨探讨,不要喷哈. J ...

  3. C III

    http://cossacksworld.ucoz.co.uk/load/c_iii_files/79 http://cossacksworld.ucoz.co.uk/load/c_iii_files ...

  4. Infinite Inversions(树状数组+离散化)

    思路及代码参考:https://blog.csdn.net/u014800748/article/details/45420085 There is an infinite sequence cons ...

  5. Oracle数据库时提示“ORA-28000

    当使用SQL*Plus登录时,Oracle数据库时提示“ORA-28000:帐号被锁定”. 导致出现改错误的原因是:在oracle database 11g中,默认在default概要文件中设置了“F ...

  6. 0vscode基本插件

    Bracket Pair Colorizer auto-close-tag Auto Rename Tag Bracket Pair Colorizer Dracula ESLint  Code Sp ...

  7. H5简单内容

    1.简单认识H5 HTML5不仅仅是作为HTML标记语言的一个最新版本,更重要的是它指定了Web开发的一系列标准,成为第一个将Web作为应用开发平台的HTML语言. 我们日常讨论的H5其实是有一个泛称 ...

  8. 经典SQL问题:Top 10%

    学生表: create table hy_student( id number(4,0) primary key, name nvarchar2(20) not null, score number( ...

  9. Repeater每行绑定事件代码

    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { Repea ...

  10. 用命令方式启动、停止appium服务和app

    启动appium服务并监听一个端口命令: 命令command==> appium -a {ip} -p {port} -U {deviceName} -g {log} 以shell命令方式执行命 ...