Skip to content

Instantly share code, notes, and snippets.

@vheidari
Last active July 31, 2022 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vheidari/2df9e91595bf4ec44ed959fb4e908f06 to your computer and use it in GitHub Desktop.
Save vheidari/2df9e91595bf4ec44ed959fb4e908f06 to your computer and use it in GitHub Desktop.
Apt, old package ( p7zip Version 16.02 ) and new tech issues ;) - 7z zStandard supporting on Linux

Issues : ( p7zip Version 16.02 ) doesn't support zStandard compression on Linux. let's bring it to your machine

if you have a package with .7z extension and this package archived with zStandard method. p7zip Version 16.02 installed from Apt official repository dosen't support to unpack your package and when you try to decompressing it you should, encounter with some error like below :

7-Zip: Unsupported Compression Method

To check what type of methods that your 7z supported you can use one of the following command :

- 7z i 
- or -> 7za i
- or -> 7zr i

In output stream result you could search for zstd in Codecs section.if you found it your 7z supportes zStandard. if not it's not supports zStandard.


To bring zStandard method to 7zip we use below repo on github:

https://github.com/jinfeihan57/p7zip

To installing p7zip on our machine we following these steps :

1. git clone https://github.com/jinfeihan57/p7zip
2. cd p7zip && make 7z 
3. ./bin/7z i

NOTE : To installing 7z to -> "/usr/bin/" path you must use the below command 

4. make install  

After install, you could use this new version of 7z to decompress files that compressed with zStandard algorithem using below command :

  7z x filename.7z

To extract special folder from the filename.7z file you can use this command :

  7z x ~/what/is/your/path/filename.7z special-folder

enjoy it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment