unzip: cannot find zipfile directory in one of。。。unzip解压失败

[root@hdss1-200 ~]# unzip -o apollo-configservice-1.5.1-github.zip
Archive:  apollo-configservice-1.5.1-github.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 apollo-configservice-1.5.1-github.zip or
        apollo-configservice-1.5.1-github.zip.zip, and cannot find apollo-configservice-1.5.1-github.zip.ZIP, period.

在centos7上部署apollo时,解压apollo-configservice-1.5.1-github.zip遇到上述报错,于是在window主机上尝试解压,发现正常解压,说明源文件正常,百度说 “一般在linux下解压zip文件,直接用系统默认的extract here进行解压(默认使用的是 unzip)
如果压缩文件.zip是大于2G的,那unzip就无法使用了,这是由于C库中long类型数据所能表示的文件偏移在32位机子上只能有2G”,但是我的包只有52M左右啊

[root@hdss1-200 ~]# ll
total 113168
-rw-------. 1 root root     1325 Jun 27  2020 anaconda-ks.cfg
-rw-r--r--  1 root root 51868604 Mar 25 07:00 apollo-adminservice-1.4.0-github.zip

于是尝试着***将文件重新压缩,上传,unzip解压***,奇迹来了,居然解压成功了。(包解压完是59M,重新压缩成zip包后,居然有105M,对压缩机制不了解,有大佬了解的,还望赐教)

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值