我在我的电脑上安装了一些软件,比如 Docker、Jenkins 等,但它们不起作用,它只显示 Docker-Desktop 依赖于 qemu-system-86

我在我的电脑上安装了一些软件,比如 Docker、Jenkins 等,但它们不起作用,它只显示 Docker-Desktop 依赖于 qemu-system-86

我一直在尝试安装它,但得到的回复如下

ife@ife-HP-ProBook-6560b:~$ sudo apt-get install qemu-system-x86
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  docker-scan-plugin libqrencode4 pass pigz qrencode slirp4netns tree uidmap
  xclip
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  samba vde2
The following NEW packages will be installed:
  qemu-system-x86
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6,735 kB of archives.
After this operation, 32.7 MB of additional disk space will be used.
E: Invalid archive member header
E: Prior errors apply to /var/cache/apt/archives/qemu-system-x86_1%3a4.2-3ubuntu6.24_amd64.deb
debconf: apt-extracttemplates failed: No such file or directory
(Reading database ... 161767 files and directories currently installed.)
Preparing to unpack .../qemu-system-x86_1%3a4.2-3ubuntu6.24_amd64.deb ...
Unpacking ipxe-qemu (1.0.0+git-20190109.133f4c4-0ubuntu3.2) over (1.0.0+git-20190109.133f4c4-0ubuntu3.2) ...
dpkg: dependency problems prevent configuration of qemu-kvm:
 qemu-kvm depends on qemu-system-x86 (= 1:4.2-3ubuntu6.24); however:
  Package qemu-system-x86 is not installed.

dpkg: error processing package qemu-kvm (--configure):
 dependency problems - leaving unconfigured
Setting up ipxe-qemu (1.0.0+git-20190109.133f4c4-0ubuntu3.2) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 qemu-kvm
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

E: Invalid archive member header
E: Prior errors apply to /var/cache/apt/archives/qemu-system-x86_1%3a4.2-3ubuntu6.24_amd64.deb

我相信这些是您输出中的重要行。qemu-system-x86 包可能在下载过程中损坏。首先清除 apt 缓存:

sudo apt-get clean

然后更新包列表并尝试完成所有待处理的安装:

sudo apt-get update
sudo apt-get -f install
sudo dpkg --configure -a

你的输出是软件包 qemu-system-x86 未安装,所以我认为没有必要删除/清除 qemu-system-x86。

如果上述命令成功,请尝试再次安装 qemu-system-x86。如果这些命令出现错误,请在此处发布。

一旦所有其他问题都修复了,您就可以运行sudo apt autoremove以删除不需要的软件包。

相关内容