我正在尝试更新 apt 源,但出现以下错误,如何修复它

我正在尝试更新 apt 源,但出现以下错误,如何修复它

我正在尝试更新 apt 源。我收到以下错误。如何修复?

sudo apt-get update
Hit:1 https://download.gocd.org  InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                 
Hit:3 http://dl.google.com/linux/chrome/deb stable Release                                                                                   
Hit:4 http://ppa.launchpad.net/ansible/ansible/ubuntu cosmic InRelease                                                                       
  404  Not Found [IP: 147.75.85.69 80]
Err:16 http://us.archive.ubuntu.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 91.189.91.38 80]
Reading package lists... Done
E: The repository 'http://apt.postgresql.org/pub/repos/apt cosmic-pgdg Release' does not have 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://security.ubuntu.com/ubuntu cosmic-security Release' does not have 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://us.archive.ubuntu.com/ubuntu cosmic Release' does not have a Release file.

linux@bheemesh:~/Downloads$** 

答案1

因此,您可能已经升级了操作系统,或者对操作系统的支持已结束,这就是问题所在。这些存储库不支持您的操作系统版本。这些存储库仍可在http://old-releases.ubuntu.com/ubuntu。您可以在 /etc/apt/sources.list 中更改它们,将所有出现的http://us.archive.ubuntu.comhttp://old-releases.ubuntu.com

您可以通过终端打开 sources.listsudo nano etc/apt/sources.list

修复该问题的另一种方法:

  1. 打开“软件和更新”
  2. 点击“其他软件”
  3. 选择您收到错误的存储库并删除复选框
  4. 对 repos 执行同样的操作,你也会得到其他错误

相关内容