0

I am trying to update the apt source. I am getting the following error. How to fix it?

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$** 
  • Possible duplicate https://askubuntu.com/questions/866901 Which version of Ubuntu are you using? – kortewegdevries May 01 '20 at 06:06
  • linux@bheemesh:~/Downloads$ lsb_release -a LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.10 Release: 18.10 Codename: cosmic – Bheemesh May 01 '20 at 06:23
  • Hi, You are using Ubuntu 18.10 which has reached end of life on 18 July 2019. So questions regarding that release are not on topic here. Upgrade to the latest release. As for your issue the repositories get moved once the releases reach end of life. Hence the 404 error. – kortewegdevries May 01 '20 at 06:34

1 Answers1

0

So you may have upgraded your OS or the support for it has ended and that is the problem. Those repositories don't support your OS version. The repositories are still available on http://old-releases.ubuntu.com/ubuntu. You can change them in /etc/apt/sources.list, replacing all occurences of http://us.archive.ubuntu.com with http://old-releases.ubuntu.com.

you can open sources.list via the terminal with sudo nano etc/apt/sources.list

Another way to fix the problem:

  1. Open "Software & Updates"
  2. Click "Other Software"
  3. Choose a repository you get an error from and remove the checkbox
  4. Do the same with the repos you get other errors as well
Grigor
  • 176