Ubuntu 22.10 Kinetic无法更新archive.ubuntu.com仓库的问题求助
Ubuntu 22.10 Kinetic无法更新archive.ubuntu.com仓库的问题求助
你好,我今天遇到了Ubuntu更新的异常问题,昨天还能正常操作,今天执行更新命令就报错了。我运行的更新命令是:
sudo apt update
得到的错误输出如下:
Ign:1 http://archive.ubuntu.com/ubuntu kinetic InRelease Ign:2 http://archive.ubuntu.com/ubuntu kinetic-updates InRelease Ign:3 http://archive.ubuntu.com/ubuntu kinetic-backports InRelease Ign:4 http://archive.ubuntu.com/ubuntu kinetic-security InRelease Err:5 http://archive.ubuntu.com/ubuntu kinetic Release 404 Not Found [IP: 185.125.190.36 80] Err:6 http://archive.ubuntu.com/ubuntu kinetic-updates Release 404 Not Found [IP: 185.125.190.36 80] Err:7 http://archive.ubuntu.com/ubuntu kinetic-backports Release 404 Not Found [IP: 185.125.190.36 80] Err:8 http://archive.ubuntu.com/ubuntu kinetic-security Release 404 Not Found [IP: 185.125.190.36 80] Reading package lists... Done E: The repository 'http://archive.ubuntu.com/ubuntu kinetic Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu kinetic-updates Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu kinetic-backports Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu kinetic-security Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
我的网络是正常的,这台虚拟机部署在Proxmox上,昨天还能正常更新。当前的netplan配置(注:原配置里的dhcp4: no:( And m是输入失误,已修正)如下:
network: ethernets: ens18: dhcp4: no dhcp6: no addresses: - 192.168.122.205/24 routes: - to: default via: 192.168.122.1 nameservers: addresses: [8.8.8.8, 8.8.4.4] version: 2 renderer: networkd
问题分析与解决方案
首先得明确:Ubuntu 22.10(Kinetic Kudu)是非长期支持(Non-LTS)版本,它的官方支持周期早在2023年7月20日就结束了。官方会停止对非LTS版本的软件更新支持,并且把对应仓库从archive.ubuntu.com迁移到旧版本归档仓库old-releases.ubuntu.com,这就是你遇到404错误的核心原因——原仓库地址已经没有Kinetic的相关文件了。
解决步骤如下:
备份原有软件源配置
先备份相关配置文件,防止操作失误导致问题:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo cp -r /etc/apt/sources.list.d/ /etc/apt/sources.list.d.bak批量替换仓库地址
使用sed命令把所有配置文件里的archive.ubuntu.com和security.ubuntu.com替换为归档仓库地址:sudo sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list sudo sed -i 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list sudo sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list.d/*.list sudo sed -i 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list.d/*.list重新执行更新
现在再运行更新命令,应该就能正常获取软件包列表了:sudo apt update(可选)升级到LTS版本
如果你希望长期获得官方的安全更新和软件支持,建议升级到最新的LTS版本(比如Ubuntu 22.04 LTS或24.04 LTS),可以通过以下命令操作:sudo do-release-upgrade注意:升级前请务必备份重要数据,确保网络稳定。
备注:内容来源于stack exchange,提问作者Kirill Muchow
相关产品推荐
相关产品推荐

