dkpg 未找到错误代码 1

dkpg 未找到错误代码 1
sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  dirmngr gnupg gnupg-l10n gnupg-utils gnupg2 gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv
  openssl
13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
13 standard security updates
Need to get 0 B/3,435 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/00-gpg-wks-client_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/00-gpg-wks-client_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/01-dirmngr_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/01-dirmngr_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/02-gnupg-utils_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/02-gnupg-utils_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/03-gpg-wks-server_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/03-gpg-wks-server_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/04-gpg-agent_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/04-gpg-agent_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/05-gpg_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/05-gpg_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/06-gpgconf_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/06-gpgconf_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/07-gnupg-l10n_2.2.27-3ubuntu2.1_all.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/07-gnupg-l10n_2.2.27-3ubuntu2.1_all.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/08-gnupg_2.2.27-3ubuntu2.1_all.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/08-gnupg_2.2.27-3ubuntu2.1_all.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/09-gpgsm_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/09-gpgsm_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: archive '/tmp/apt-dpkg-install-8sELeG/10-gpgv_2.2.27-3ubuntu2.1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8sELeG/10-gpgv_2.2.27-3ubuntu2.1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 /tmp/apt-dpkg-install-8sELeG/00-gpg-wks-client_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/01-dirmngr_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/02-gnupg-utils_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/03-gpg-wks-server_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/04-gpg-agent_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/05-gpg_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/06-gpgconf_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/07-gnupg-l10n_2.2.27-3ubuntu2.1_all.deb
 /tmp/apt-dpkg-install-8sELeG/08-gnupg_2.2.27-3ubuntu2.1_all.deb
 /tmp/apt-dpkg-install-8sELeG/09-gpgsm_2.2.27-3ubuntu2.1_amd64.deb
 /tmp/apt-dpkg-install-8sELeG/10-gpgv_2.2.27-3ubuntu2.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我不知道太多。我是 Linux 新手,不知道从哪里开始。

答案1

您可以手动重新打包 .deb:

first you need to know where apt stores packages (example: /var/cache/apt/archives/ )

save the following code as shell script (example: repack.sh)


#!/bin/bash
ar x $1
zstd -d < control.tar.zst | xz > control.tar.xz
zstd -d < data.tar.zst | xz > data.tar.xz
ar -m -c -a sdsd ~/package.deb debian-binary control.tar.xz data.tar.xz
rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst
dpkg -i ~/package.deb

并执行:

repack.sh /var/cache/apt/archives/zst-compressed-package.deb

相关内容