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

本文介绍了在Linux中遇到大型COCO数据集解压问题时,如何通过使用fastjar而非unzip命令来解决'cannot find zip file directory'错误。方法包括安装fastjar并利用jar xvf命令进行解压,特别针对超过2GB的.zip文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在linux上下载好coco20017数据集,解压时候:

year=2017
unzip train{$year}.zip
unzip val{$year}.zip

报错:

Archive:  train2017.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 train2017.zip or
        train2017.zip.zip, and cannot find train2017.zip.ZIP, period.

解决办法:
不使用 unzip 命令解压zip 文件,改用 jar 解压文件
用fastjar去解压。

1 在终端打出sudo apt-get install fastjar下载fastjar

2.jar xvf 目录/**.zip  

原因:
一般在linux下解压zip文件,直接用系统默认的 unzip命令
但是如果压缩文件.zip是大于2G的,那unzip就无法使用了,就会报出cannot find or open的错误

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值