Question

apt-get update errors and 404 not found

Posted August 1, 2021 268 views
Ubuntu 20.04

Ubuntu 20.04.2 LTS

Been trying to install mongodb, but am running into quite a few issues

Output of sudo apt update:

Ign:1 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release                            
Get:3 http://mirrors.digitalocean.com/ubuntu focal InRelease [265 kB]                              
Hit:5 http://mirrors.digitalocean.com/ubuntu focal-updates InRelease                               
Ign:6 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 InRelease                          
Hit:7 http://mirrors.digitalocean.com/ubuntu focal-backports InRelease                             
Ign:8 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 InRelease                          
Ign:9 http://old-releases.ubuntu.com/ubuntu focal-security InRelease                               
Hit:10 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 Release                           
Err:11 http://old-releases.ubuntu.com/ubuntu focal-security Release                                
  404  Not Found [IP: 91.189.91.124 80]
Hit:13 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 Release                           
Get:4 http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease [377 kB]              
Err:4 http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Ign:14 https://nginx.org/packages/mainline/debian bullseye InRelease
Err:15 https://nginx.org/packages/mainline/debian bullseye Release
  404  Not Found [IP: 3.125.197.172 443]
Reading package lists... Done
E: The repository 'http://old-releases.ubuntu.com/ubuntu focal-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: Failed to fetch http://downloads-distro.mongodb.org/repo/ubuntu-upstart/dists/dist/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease' is not signed.
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 'https://nginx.org/packages/mainline/debian bullseye 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.

Contents of /etc/apt/sources.list :

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.digitalocean.com/ubuntu/ focal main restricted
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.digitalocean.com/ubuntu/ focal-updates main restricted
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.digitalocean.com/ubuntu/ focal universe
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal universe
deb http://mirrors.digitalocean.com/ubuntu/ focal-updates universe
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.digitalocean.com/ubuntu/ focal multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal multiverse
deb http://mirrors.digitalocean.com/ubuntu/ focal-updates multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.digitalocean.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://old-releases.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu focal-security main restricted
deb http://old-releases.ubuntu.com/ubuntu focal-security universe
# deb-src http://old-releases.ubuntu.com/ubuntu focal-security universe
deb http://old-releases.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu focal-security multiverse
deb https://nginx.org/packages/mainline/debian/ bullseye nginx
deb-src https://nginx.org/packages/mainline/debian/ bullseye nginx

Thank you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @ilianbronchart,

You need to change old-releases.ubuntu.com to archive.ubuntu.com for that entry in your /etc/apt/sources.list.

You can find them at the last lines of the file:


deb http://old-releases.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu focal-security main restricted
deb http://old-releases.ubuntu.com/ubuntu focal-security universe
# deb-src http://old-releases.ubuntu.com/ubuntu focal-security universe
deb http://old-releases.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu focal-security multiverse
deb https://nginx.org/packages/mainline/debian/ bullseye nginx
deb-src https://nginx.org/packages/mainline/debian/ bullseye nginx

This should help out.