You want to install a recent version of Ubuntu from Debian using
debootstrap (say, from the Hetzner recovery OS) but you keep getting the following error:
base-files E: Tried to extract package, but file already exists. Exit...
After consulting the
debootstrap.log in the target, you find an error that looks similar to the following:
dpkg-deb: error: archive './/var/cache/apt/archives/base-files_12ubuntu4_arm64.deb' uses unknown compression for member 'control.tar.zst', giving up
Well, that's because
dpkg in Debian doesn't support
zstd compression, despite Debian bug #892664 being open since 2018 to add support.
dpkg from Ubuntu.
zstd compression is supported and
debootstrap will work. In this case, I used
dpkg_1.19.7ubuntu3_arm64.deb because the latest version of dpkg from Ubuntu required a newer libc than was available in Debian:
root@rescue /tmp # dpkg -i dpkg_1.21.1ubuntu2_arm64.deb dpkg: regarding dpkg_1.21.1ubuntu2_arm64.deb containing dpkg, pre-dependency problem: dpkg pre-depends on libc6 (>= 2.34) libc6:arm64 is installed, but is version 2.31-13+deb11u3.
debootstrap again and it should complete successfully.