disto 和 archive 之间的软件包版本错误

disto 和 archive 之间的软件包版本错误

apt-get 已知的某些软件包的版本与存档中的版本不同。例如:

$ sudo apt-get install qemu-system-x86
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
 cpu-checker ipxe-qemu ipxe-qemu-256k-compat-efi-roms msr-tools ovmf qemu-system-common qemu-system-data qemu-system-gui seabios
Suggested packages:
 samba vde2
The following NEW packages will be installed:
 cpu-checker ipxe-qemu ipxe-qemu-256k-compat-efi-roms msr-tools ovmf qemu-system-common qemu-system-data qemu-system-gui qemu-system-x86 seabios
0 upgraded, 10 newly installed, 0 to remove and 228 not upgraded.
Need to get 12.5 MB of archives.
After this operation, 51.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 msr-tools amd64 1.3-3 [10.0 kB]
Get:2 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 cpu-checker amd64 0.7-1.1 [6,936 B]
Get:3 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 ipxe-qemu all 1.0.0+git-20190109.133f4c4-0ubuntu3.2 [930 kB]
Get:4 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 ipxe-qemu-256k-compat-efi-roms all 1.0.0+git-20150424.a25a16d-0ubuntu4 [552 kB]
Ign:5 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-common amd64 1:4.2-3ubuntu6.21
Ign:6 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-data all 1:4.2-3ubuntu6.21
Ign:7 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-gui amd64 1:4.2-3ubuntu6.21
Get:8 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 seabios all 1.13.0-1ubuntu1.1 [138 kB]
Ign:9 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-x86 amd64 1:4.2-3ubuntu6.21
Get:10 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 ovmf all 0~20191122.bd85bf54-2ubuntu3.3 [2,490 kB]
Ign:6 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-data all 1:4.2-3ubuntu6.21
Err:5 http://security.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-common amd64 1:4.2-3ubuntu6.21
 404  Not Found [IP: 2001:67c:1562::15 80]
Err:7 http://security.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-gui amd64 1:4.2-3ubuntu6.21
 404  Not Found [IP: 2001:67c:1562::15 80]
Err:9 http://security.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-x86 amd64 1:4.2-3ubuntu6.21
 404  Not Found [IP: 2001:67c:1562::15 80]
Ign:6 http://security.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-data all 1:4.2-3ubuntu6.21
Err:6 http://security.ubuntu.com/ubuntu focal-updates/main amd64 qemu-system-data all 1:4.2-3ubuntu6.21
 404  Not Found [IP: 2001:67c:1562::15 80]
Fetched 4,127 kB in 2s (2,089 kB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-common_4.2-3ubuntu6.21_amd64.deb  404  Not Found [IP: 2001:67c:1562::15 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-data_4.2-3ubuntu6.21_all.deb  404  Not Found [IP: 2001:67c:1562::15 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-gui_4.2-3ubuntu6.21_amd64.deb  404  Not Found [IP: 2001:67c:1562::15 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-x86_4.2-3ubuntu6.21_amd64.deb  404  Not Found [IP: 2001:67c:1562::15 80]
E: Unable to fetch some archives, try running apt-get update or apt-get --fix-missing.

该工具尝试获取的包之一是:

http://security.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-common_4.2-3ubuntu6.21_amd64.deb 

但存在的文件是:

http://security.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-common_4.2-3ubuntu6.24_amd64.deb

因此,apt-get 需要的内容与档案库中提供的内容之间存在差异。我尝试按照建议运行“apt-get update”或“apt-get --fix-missing”,但无济于事。

$ lsb_release -a
LSB Version:    core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

非常感谢

答案1

更新您的软件列表;您的问题表明用户级别或程序错误。我在你的粘贴中随机挑选了一个包,可用的包是

 qemu-system-common | 1:4.2-3ubuntu6          | focal            | amd64, arm64, armhf, ppc64el, riscv64, s390x
 qemu-system-common | 1:4.2-3ubuntu6.24       | focal-security   | amd64, arm64, armhf, ppc64el, riscv64, s390x
 qemu-system-common | 1:4.2-3ubuntu6.24       | focal-updates    | amd64, arm64, armhf, ppc64el, riscv64, s390x
 qemu-system-common | 1:4.2-3ubuntu6.25       | focal-proposed   | amd64, arm64, armhf, ppc64el, riscv64, s390x

但你的系统及其过时的列表正在寻找1:4.2-3ubuntu6.21

您的问题是缺乏安全修复和更新以及系统非常过时。

完全升级后的 Ubuntu 20.04 LTS 系统将报告为Ubuntu 20.04.6但你的报告是 20.04.2 ?因为你之前没有应用安全修复或更新2021 年 8 月

请注意,我提供的 ISO 发布日期链接适用于新安装,已安装的系统在 ISO 发布日期前一周以上收到这些更新。

用于 sudo apt update更新软件列表 sudo apt full-upgrade以应用修复

我希望你的系统保持离线。

相关内容