首页 > 解决方案 > 解压缩错误:未找到中央目录结尾签名。此文件不是 zipfile,或者它构成多部分存档的一个磁盘

问题描述

Zip 文件是从 github 下载的。但是,当我尝试解压缩此文件时出现错误。下载的文件大小只有1KB,而应该是175MB。任何线索如何解决它?

[abc@login01 ~]$ git clone https://github.com/ahmetrifaioglu/DEEPScreen.git
Cloning into 'DEEPScreen'...
remote: Enumerating objects: 2641, done.
remote: Counting objects: 100% (2641/2641), done.
remote: Compressing objects: 100% (2554/2554), done.
remote: Total 5683 (delta 76), reused 2630 (delta 73), pack-reused 3042
Receiving objects: 100% (5683/5683), 117.89 MiB | 268.00 KiB/s, done.
Resolving deltas: 100% (1916/1916), done.
Updating files: 100% (2139/2139), done.

我试图解压这个文件,但得到一个错误:

[abc@login01 trainingFiles]$ unzip chembl_23_chemreps.txt.zip 
Archive:  chembl_23_chemreps.txt.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 chembl_23_chemreps.txt.zip or
        chembl_23_chemreps.txt.zip.zip, and cannot find chembl_23_chemreps.txt.zip.ZIP, period.

文件“chembl_23_chemreps.txt.zip”的内容如下:

版本https://git-lfs.github.com/spec/v1 oid sha256:00bdd28bc6d3add8795150538dff4e17f4852d41744a8e69631c56f4a3bc33f7 大小 164256561

机器:Centos

标签: githubunzipgit-lfs

解决方案


这个存储库使用 Git LFS 来存储大型对象。该文件是一个 Git LFS 指针文件,用于代替存储库中真正的大对象,因为大对象不存储在存储库之外。

您需要安装 Git LFS,可能来自 EPEL,然后运行git lfs install​​. 此时,Git LFS 应该会在新的存储库上自动运行。

要修复您现有的存储库,请运行git lfs pull它,它将拉下文件并正确检出它们。


推荐阅读