压缩和解压

举报
liuzhen007 发表于 2021/09/30 22:51:48 2021/09/30
1.7k+ 0 0
【摘要】 问题今天在服务器上解压一个压缩包 outlib.tar.zip 文件,遇到如下报错:root@VM-12-4-ubuntu:~/bag# unzip outlib.tar.zip Archive: outlib.tar.zip End-of-central-directory signature not found. Either this file is not a zipfile, or...

问题

今天在服务器上解压一个压缩包 outlib.tar.zip 文件,遇到如下报错:
root@VM-12-4-ubuntu:~/bag# unzip outlib.tar.zip Archive: outlib.tar.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 outlib.tar.zip or outlib.tar.zip.zip, and cannot find outlib.tar.zip.ZIP, period.

截图如下:

解决

1. 安装7za工具包,命令:

apt install p7zip-full

2. 解压zip层,命令:

7za x outlib.tar.zip
去掉zip层,生成 outlib.tar

3. 然后解压tar,命令:

tar -xvf outlib.tar

提示:
root@VM-12-4-ubuntu:~/bag# 7za x linux_x86.tar.zip 7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz (50655),ASM,AES-NI) Scanning the drive for archives: 1 file, 17143413 bytes (17 MiB) Extracting archive: linux_x86.tar.zip WARNING: linux_x86.tar.zip Can not open the file as [zip] archive The file is open as [gzip] archive -- Path = linux_x86.tar.zip Open WARNING: Can not open the file as [zip] archive Type = gzip Headers Size = 10 Everything is Ok Archives with Warnings: 1 Size: 43314688 Compressed: 17143413


【声明】本内容来自华为云开发者社区博主,不代表华为云及华为云开发者社区的观点和立场。转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息,否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

作者其他文章

评论(0

抱歉,系统识别当前为高风险访问,暂不支持该操作

    全部回复

    上滑加载中

    设置昵称

    在此一键设置昵称,即可参与社区互动!

    *长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

    *长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。