This error occurs when installing .deb packages that use zstd (Zstandard) compression on systems with older dpkg versions that don't support it. Common on Debian 11 and Raspberry Pi systems trying to install newer packages. Fix by upgrading dpkg, installing zstd, or repackaging the .deb file.
When you try to install a .deb file, dpkg inspects the archive structure to extract the control and data tarballs. Newer Debian and Ubuntu distributions (21.10+) default to zstd compression for these internal archives. However, older dpkg versions (before 1.21.0) only support gzip and xz compression, so they fail with an "unknown compression" error when encountering zstd-compressed members. This is a compatibility issue between newer packages and older system tools.
First, verify which version of dpkg is installed:
dpkg --versionLook for the version number. If it's 1.21.0 or newer, your dpkg should support zstd. If it's 1.20.9 or older, you'll need to upgrade.
Some systems can handle zstd-compressed packages if the zstd library is installed:
sudo apt-get update
sudo apt-get install -y zstdAfter installing zstd, try installing the .deb package again:
sudo apt install ./package.debThis works if your dpkg version already has zstd support compiled in.
If installing zstd alone doesn't work, upgrade dpkg to a version with native zstd support:
sudo apt-get update
sudo apt-get install --only-upgrade dpkgThen try installing the package again. This is the most reliable solution if your Debian version can provide dpkg 1.21.0 or later.
If upgrading dpkg is not an option, extract and repackage the .deb with gzip compression:
# Extract the original package
dpkg-deb -x package.deb tmp
dpkg-deb -e package.deb tmp/DEBIAN
# Repackage with gzip compression
dpkg-deb -Zgzip -b tmp package-repackaged.debThen install the repackaged version:
sudo apt install ./package-repackaged.debThis converts the internal compression from zstd to gzip, making it compatible with older dpkg versions.
Zstandard (zstd) compression became the default in Ubuntu 21.10 and offers better compression ratios and speed than xz or gzip. However, this creates a compatibility gap for systems still running older dpkg versions. If you are building Debian packages for distribution to systems that might have older dpkg, consider using the -Zgzip flag with dpkg-deb to ensure compatibility. For Raspberry Pi users, check if raspbian/Debian repositories have updated versions available—sometimes package maintainers release fixed versions with compatible compression after reports are filed.
E: Could not connect to proxy server
Could not connect to proxy server
E: Package 'package:i386' has no installation candidate
How to fix "Package package:i386 has no installation candidate" in apt
E: The value 'value' is invalid for APT::Default-Release
How to fix invalid APT::Default-Release value in APT
dpkg: error: unable to create new file 'path': Permission denied
How to fix dpkg permission denied errors in APT
subprocess installed post-removal script returned error exit status 1
How to fix "subprocess installed post-removal script returned error exit status 1" in APT