Score:1

404 and 'Repository does not have a release file' on apt-get update for Ubuntu 18.04.5

ng flag

I'm trying to install a product on a client's server and am continuously hit with the following output when I try to run apt-get update:

root@cfmpoweredge:/etc/apt# apt-get update
Ign:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Err:4 http://archive.ubuntu.com/ubuntu bionic Release
  404  Not Found [IP: 91.189.88.142 80]
Ign:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Err:6 http://archive.ubuntu.com/ubuntu bionic-updates Release
  404  Not Found [IP: 91.189.88.152 80]
Err:7 http://security.ubuntu.com/ubuntu bionic-security Release
  404  Not Found [IP: 91.189.91.38 80]
Err:8 http://archive.ubuntu.com/ubuntu bionic-backports Release
  404  Not Found [IP: 91.189.88.142 80]
Reading package lists... Done
E: The repository 'http://archive.ubuntu.com/ubuntu bionic 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://archive.ubuntu.com/ubuntu bionic-updates 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 bionic-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://archive.ubuntu.com/ubuntu bionic-backports 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.

The /etc/apt/sources.list file looks like this:

root@cfmpoweredge:/etc/apt# cat sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu bionic main restricted
# deb-src http://archive.ubuntu.com/ubuntu bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu bionic-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://archive.ubuntu.com/ubuntu bionic universe
# deb-src http://archive.ubuntu.com/ubuntu bionic universe
deb http://archive.ubuntu.com/ubuntu bionic-updates universe
# deb-src http://archive.ubuntu.com/ubuntu bionic-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://archive.ubuntu.com/ubuntu bionic multiverse
# deb-src http://archive.ubuntu.com/ubuntu bionic multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu bionic-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://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu bionic-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 bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://archive.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://archive.ubuntu.com/ubuntu bionic-security main restricted
deb http://archive.ubuntu.com/ubuntu bionic-security universe
# deb-src http://archive.ubuntu.com/ubuntu bionic-security universe
deb http://archive.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://archive.ubuntu.com/ubuntu bionic-security multiverse

I've tried substituting archive.ubuntu.com for both us.archive.ubuntu.com and za.archive.ubuntu.com (we are based in South Africa) and am met with similar errors each time, as I am when using mirrors.digitalocean.com.

Furthermore, I'm able to ping both the URL and the IP address listed in the 404 messages, so I'm fairly certain it's not a network connectivity issue. There are no proxies specified in /etc/apt/apt.conf.d/.

Any help would be greatly appreciated!

Whois_me avatar
us flag
You've checked already, I presume. But this looks like you are behind a proxy
the_DJDJ avatar
ng flag
@rm-rf I wish, that would make diagnosing the problem much easier. No, the server is connected directly to the internet.
Whois_me avatar
us flag
Another thing what might set you on track: You'll also get 404's if your UB distro is out of the support time span.
the_DJDJ avatar
ng flag
We use Ubuntu 18.04.5 LTS as it's [https://wiki.ubuntu.com/Releases](supported until April 2023), but the thought did certainly cross my mind. A lot of forum results suggest using old-releases.ubuntu.com as a repository, but as Bionic isn't yet out-of-life that isn't an option @rm-rf
Jad avatar
br flag
Jad
I agree that it looks like it should be working: http://archive.ubuntu.com/ubuntu/dists/bionic-backports/ ... I'm assuming you've tried again, in case the site was being "refreshed"?
the_DJDJ avatar
ng flag
@Jad Indeed; tried multiple times with multiple variations of the sources.list file, all to no avail
Jad avatar
br flag
Jad
did the link, in my comment, work on the computer that's having trouble updating? if you don't have a browser, you might need to `wget` or `curl` it
the_DJDJ avatar
ng flag
@Jad It did not, surprisingly! Even bad results are results. This would point to a potential networking issue then? A little digging to (aka `curl http://archive.ubuntu.com`) gave me [this](https://pastebin.com/8yBaB7Uw), which is definitely not right. I'll ask the client to double check their network configuration
Jad avatar
br flag
Jad
so not a proxy exactly, but there-in lies your problem. good luck
the_DJDJ avatar
ng flag
@Jad Thanks for your help!
Score:2
ng flag

Whilst not strictly a proxy issue, the problem was indeed network related.

The server could connect by pinging the repository mirrors, but curling the addresses returned a Mikrotik router login page. Upon further inspection, this seemed to be the case for any site. That'll teach me to use ping for testing network connectivity!

Thanks @rm-rf and @Jad for their assistance

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.