4

I was trying to install a deb package which refused to run because of dependencies, after failed attempt to install the dependencies or OS updates i uninstalled the deb package. since there were a number of pending updates, i tried running those but the sources urls were reporting NOT Found.

Server: ubuntu 21.04

apt update
Hit:1 https://deb.nodesource.com/node_14.x hirsute InRelease
Hit:2 https://dl.yarnpkg.com/debian stable InRelease                       
Ign:3 http://us.archive.ubuntu.com/ubuntu hirsute InRelease                
Ign:4 http://us.archive.ubuntu.com/ubuntu hirsute-updates InRelease
Ign:5 http://us.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Ign:6 http://us.archive.ubuntu.com/ubuntu hirsute-security InRelease
Err:7 http://us.archive.ubuntu.com/ubuntu hirsute Release
  404  Not Found [IP: 91.189.91.38 80]
Err:8 http://us.archive.ubuntu.com/ubuntu hirsute-updates Release
  404  Not Found [IP: 91.189.91.38 80]
Err:9 http://us.archive.ubuntu.com/ubuntu hirsute-backports Release
  404  Not Found [IP: 91.189.91.38 80]
Err:10 http://us.archive.ubuntu.com/ubuntu hirsute-security Release
  404  Not Found [IP: 91.189.91.38 80]
Reading package lists... Done
E: The repository 'http://us.archive.ubuntu.com/ubuntu hirsute 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://us.archive.ubuntu.com/ubuntu hirsute-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://us.archive.ubuntu.com/ubuntu hirsute-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.
E: The repository 'http://us.archive.ubuntu.com/ubuntu hirsute-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.

Any ideas on how to resolve this

3 Answers 3

5

Ubuntu 21.04 was non LTS version and was supported up to begin od 2022 year. The best solution is an upgrade to current LTS version - 22.04. If it's not possible - change source in /etc/apt/sources.list to https://old-releases.ubuntu.com/ubuntu/ - it's an archive for outdated ubuntu versions.

14

A quick fix for this is to run:

sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

... before the apt update command.

2
  • 2
    Note that there is no us.old-releases.ubuntu.com. The us. needs to be removed after running sed, or prepended to the sed matches.
    – freb
    Feb 1 at 20:43
  • wow, it works! thanks sir!
    – toto'
    Mar 19 at 12:12
2

Ubuntu 21.04 (Hirsute Hippo) End of Life reached on January 20 2022.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .