无法在 Ubuntu 21.10 上运行“apt update”

Bla*_*umm 16 ubuntu update apt

我在运行时遇到以下错误apt update,导致我无法更新 Ubuntu 服务器。

~$ sudo apt update
Ign:1 http://security.ubuntu.com/ubuntu impish-security InRelease
Err:2 http://security.ubuntu.com/ubuntu impish-security Release
  404  Not Found [IP: 91.189.91.39 80]
Hit:3 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu impish InRelease
Ign:4 http://nova.clouds.archive.ubuntu.com/ubuntu impish InRelease
Ign:5 http://nova.clouds.archive.ubuntu.com/ubuntu impish-updates InRelease
Ign:6 http://nova.clouds.archive.ubuntu.com/ubuntu impish-backports InRelease
Err:7 http://nova.clouds.archive.ubuntu.com/ubuntu impish Release
  404  Not Found [IP: 185.125.190.41 80]
Err:8 http://nova.clouds.archive.ubuntu.com/ubuntu impish-updates Release
  404  Not Found [IP: 185.125.190.41 80]
Err:9 http://nova.clouds.archive.ubuntu.com/ubuntu impish-backports Release
  404  Not Found [IP: 185.125.190.41 80]
Get:12 https://download.docker.com/linux/ubuntu impish InRelease [48.9 kB]
Get:10 https://packagecloud.io/netdata/netdata-edge/ubuntu impish InRelease [24.8 kB]
Hit:11 https://packagecloud.io/netdata/netdata-repoconfig/ubuntu impish InRelease
Get:13 https://packagecloud.io/netdata/netdata-edge/ubuntu impish/main amd64 Packages [13.3 kB]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu impish-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.
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu impish 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://nova.clouds.archive.ubuntu.com/ubuntu impish-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://nova.clouds.archive.ubuntu.com/ubuntu impish-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.
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,ping 解析主机名:

~$ ping security.ubuntu.com
PING security.ubuntu.com (185.125.190.39) 56(84) bytes of data.
64 bytes from aerodent.canonical.com (185.125.190.39): icmp_seq=1 ttl=51 time=75.4 ms
64 bytes from aerodent.canonical.com (185.125.190.39): icmp_seq=2 ttl=51 time=73.9 ms
64 bytes from aerodent.canonical.com (185.125.190.39): icmp_seq=3 ttl=51 time=73.9 ms
64 bytes from aerodent.canonical.com (185.125.190.39): icmp_seq=4 ttl=51 time=74.5 ms
64 bytes from aerodent.canonical.com (185.125.190.39): icmp_seq=5 ttl=51 time=74.4 ms
Run Code Online (Sandbox Code Playgroud)

需要明确的是,我在 Ubuntu 服务器上打开了自动更新,这是最近发生的(过去一周或两周)。请帮忙!

Lac*_*cek 23

Impish 于 7 月 14 日停产。因此,在镜像上无法再找到它的存储库,因此如果您想继续使用此版本,则需要将old-releases.ubuntu.com其用作镜像。

但请注意,Impish 将不再有升级,因此您可能需要切换到受支持的版本。最简单的升级方法是运行以下命令:do-release-upgrade

  • 更具体地说,以下两个命令将更新您的 APT 源以使用软件包的“旧版本”版本。之后,您的“apt update”和“apt Upgrade”应该会成功。以下是命令: `sudo sed -i -r 's/([az]{2}.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list`和 `sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list` (15认同)
  • @MikeF你的评论非常有价值,你能将其转换为“答案”吗? (3认同)

小智 9

我尝试了这个(在RPI3,Ubuntu 21.10上),修改/etc/apt/sources.list

deb http://ports.ubuntu.com/ubuntu-ports impish main restricted
Run Code Online (Sandbox Code Playgroud)

deb http://old-releases.ubuntu.com/ubuntu impish-security main restricted
Run Code Online (Sandbox Code Playgroud)

对所有条目执行相同的操作(首先复制)

然后

sudo apt update
sudo apt upgrade
Run Code Online (Sandbox Code Playgroud)

就我而言,升级成功。

然后我尝试了

sudo do-release-upgrade 
Run Code Online (Sandbox Code Playgroud)

这失败了:

Checking for a new Ubuntu release
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife

You have not rebooted after updating a package which requires a reboot. Please reboot before upgrading.
Run Code Online (Sandbox Code Playgroud)

所以稍后重新启动一次

sudo do-release-upgrade 
Run Code Online (Sandbox Code Playgroud)

= 欢迎使用 Ubuntu 22.04 'Jammy Jellyfish' =

Ubuntu 团队很自豪地发布 Ubuntu 22.04“Jammy Jellyfish”。

要了解此版本中的新增功能,请访问: https: //wiki.ubuntu.com/JammyJellyfish/ReleaseNotes


And I continued with the dist upgrade

Hope this helps

Andrew



Run Code Online (Sandbox Code Playgroud)