unzipコマンドで以下のようなエラーが出てしまう場合
$ unzip foo.zip Archive: foo.zip skipping: foo.txt unsupported compression method 99
圧縮方式が対応していないらしいです。7zというコマンドであれば解凍できました。
7zのインストール方法です。
$ sudo yum install -y epel-release $ sudo yum install -y p7zip-plugins
$ sudo apt install -y p7zip-full
ヘルプ
$ 7z --help
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs AMD EPYC 7571 (800F12),ASM,AES-NI)
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]
<Commands>
a : Add files to archive
b : Benchmark
d : Delete files from archive
e : Extract files from archive (without using directory names)
h : Calculate hash values for files
i : Show information about supported formats
l : List contents of archive
rn : Rename files in archive
t : Test integrity of archive
u : Update files to archive
x : eXtract files with full paths
解凍のしかた
$ 7z e foo.zip
補足
パッケージ名が p7zip というのと p7zip-plugins または p7zip-full というのがあったのですが、インストールされる実行ファイルは以下のとおりでした。違いはよくわかっていないです。
CentOSの場合
$ rpm -ql p7zip-plugins /usr/bin/7z $ rpm -ql p7zip /usr/bin/7za
Ubuntuの場合
$ dpkg -L p7zip-full /usr/bin/7z /usr/bin/7za $ dpkg -L p7zip /usr/bin/7zr /usr/bin/p7zip