Few days ago, I installed Ubuntu on my PC, everything works fine.
It happened that I traveled to another country and I am still there. So whenever I run the update or try to install anything from Ubuntu Software, nothing works, although my internet works fine and I can access to internet using my PC (I am using it now to write these lines).
I tried to change the server to one of the country's servers where I am now, but it didn't work. So I changed to the Ubuntu main server, it also didn't work.
I restarted my PC, run sudo apt autoclean
and sudo apt clean
, nothing changed.
I still get these errors whenever I run the update process:
sudo apt update
Ign:1 http://archive.canonical.com/ubuntu bionic InRelease
Err:2 http://archive.canonical.com/ubuntu bionic Release
404 Not Found [IP: 91.189.92.191 80]
Ign:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Ign:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:6 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Err:7 http://archive.ubuntu.com/ubuntu bionic Release
404 Not Found [IP: 91.189.88.174 80]
Err:8 http://archive.ubuntu.com/ubuntu bionic-updates Release
404 Not Found [IP: 91.189.88.174 80]
Err:9 http://archive.ubuntu.com/ubuntu bionic-backports Release
404 Not Found [IP: 91.189.88.174 80]
Err:10 http://archive.ubuntu.com/ubuntu bionic-security Release
404 Not Found [IP: 91.189.88.174 80]
Reading package lists... Done
E: The repository 'http://archive.canonical.com/ubuntu bionic 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://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://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.
E: The repository 'http://archive.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.
Anyone knows how to fix this?
EDIT:
The problem is not that I don't have the right links in /etc/apt/sources.list
. My problem is that when I run the update, the links that appear in the terminal are not similar to the ones I have in /etc/apt/sources.list
Also when I updated /etc/apt/sources.list
as Raffa said, I still get similar errors.
sudo apt update
Ign:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu bionic-security Release
404 Not Found [IP: 91.189.91.14 80]
Err:5 http://archive.ubuntu.com/ubuntu bionic Release
404 Not Found [IP: 91.189.88.31 80]
Err:6 http://archive.ubuntu.com/ubuntu bionic-updates Release
404 Not Found [IP: 91.189.88.31 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu bionic-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.
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.
Although /etc/apt/sources.list
contains the links mentioned by Raffa
cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security main multiverse universe restricted
deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse universe restricted
For some reason APT can not find the
Release
file in the specified repositories list.To fix this, I would suggest the following:
Check if your connection to the Internet is behind a firewall, limited in any way or behind a proxy and configure your system and connection accordingly or change to a different connection if available.
Check if there is an APT proxy configuration file by running the following command:
If the command returns back any results, move these files out of the
/etc/apt/apt.conf.d/
directory or delete them.A file editor will be opened. Delete all the lines in it and then copy and paste the following in the file editor:
Then, save and close the file by pressing Ctrl + X then press Y then press Enter
To verify you saved the file correctly, please run the following command in the terminal:
The output should be exactly:
After that, please update your repositories list by running the following command in the terminal:
You should now be able to install packages and update your system again.
Notice:
If you still get errors, please first back up
/etc/apt/sources.list.d/
to your home directory by running the following command in the terminal:After that, please clear all existing PPAs and repository lists in
/etc/apt/sources.list.d/
by running the following command in the terminal:Then, please update your repositories list by running the following command again in the terminal:
I think it is not exactly because the change of country from your connection. It is because the new connection has any proxy server or system to block or redirect Ubuntu servers ... (could be government or institution)
I have a similar problem connecting from the "sala de computo" (compute room) in my University.
I think I can use some VPN or servers configurations (DNS) to jump this ...
If you are in Tunisia, you could change to the appropriate repository https://launchpad.net/ubuntu/+mirror/ubuntu.mirror.tn-archive2
but I notice it's not current and does not even have files for Bionic, much less newer distros. There is no repository in Algeria or Libya, so you might try alternatives in France, Spain, Switzerland, or the Netherlands.
I simply commented out the server name that was causing me the issue in the
/etc/apt/sources.list
.