几天前,我在我的电脑上安装了 Ubuntu,一切正常。
碰巧我去了另一个国家,我还在那里。因此,每当我运行更新或尝试从 Ubuntu 软件安装任何东西时,都没有任何效果,尽管我的互联网工作正常并且我可以使用我的 PC 访问互联网(我现在正在使用它来编写这些行)。
我试图将服务器更改为我现在所在国家/地区的服务器之一,但没有成功。所以我换了Ubuntu主服务器,也没用。
我重新启动了我的电脑,运行sudo apt autoclean
并sudo apt clean
没有任何改变。
每当我运行更新过程时,我仍然会收到这些错误:
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.
任何人都知道如何解决这个问题?
编辑:
问题不在于我没有正确的链接/etc/apt/sources.list
。我的问题是,当我运行更新时,出现在终端中的链接与我在终端中的链接不相似/etc/apt/sources.list
此外,当我/etc/apt/sources.list
按照Raffa所说的那样进行更新时,我仍然会遇到类似的错误。
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.
虽然包含Raffa/etc/apt/sources.list
提到的链接
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
由于某种原因,APT 无法
Release
在指定的存储库列表中找到该文件。为了解决这个问题,我建议如下:
检查您与 Internet 的连接是否在防火墙后面、以任何方式受到限制或在代理后面,并相应地配置您的系统和连接,或者如果可用,更改为不同的连接。
通过运行以下命令检查是否存在 APT 代理配置文件:
如果命令返回任何结果,请将这些文件移出
/etc/apt/apt.conf.d/
目录或删除它们。将打开一个文件编辑器。删除其中的所有行,然后将以下内容复制并粘贴到文件编辑器中:
然后,按Ctrl+保存并关闭文件,X然后按Y再按Enter
要验证您是否正确保存了文件,请在终端中运行以下命令:
输出应该是:
之后,请通过在终端中运行以下命令来更新您的存储库列表:
您现在应该能够再次安装软件包并更新您的系统。
注意:
如果仍然出现错误,请先
/etc/apt/sources.list.d/
在终端中运行以下命令备份到您的主目录:之后,请
/etc/apt/sources.list.d/
通过在终端中运行以下命令来清除所有现有的 PPA 和存储库列表:然后,请通过在终端中再次运行以下命令来更新您的存储库列表:
我认为这不完全是因为您的连接改变了国家。这是因为新连接有任何代理服务器或系统来阻止或重定向 Ubuntu 服务器......(可能是政府或机构)
从我大学的“sala de computo”(计算室)连接时,我遇到了类似的问题。
我想我可以使用一些 VPN 或服务器配置 (DNS) 来跳过这个...
如果您在突尼斯,则可以更改为适当的存储库https://launchpad.net/ubuntu/+mirror/ubuntu.mirror.tn-archive2
但我注意到它不是最新的,甚至没有仿生的文件,更不用说新的发行版了。阿尔及利亚或利比亚没有存储库,因此您可以在法国、西班牙、瑞士或荷兰尝试替代方案。
我只是在
/etc/apt/sources.list
.