更新 apt 时,存储库确实已发布文件错误

牧人

我不断得到上面的代码,一些存储库没有发布文件。完整日志sudo apt update

Hit:1 http://security.ubuntu.com/ubuntu trusty-security InRelease
Hit:2 http://ppa.launchpad.net/git-core/ppa/ubuntu disco InRelease                                     
Hit:3 http://packages.microsoft.com/repos/vscode stable InRelease                                      
Hit:4 https://artifacts.elastic.co/packages/7.x/apt stable InRelease                                   
Ign:5 http://security.ubuntu.com/ubuntu disco-security InRelease                                     
Err:6 http://security.ubuntu.com/ubuntu disco-security Release
  404  Not Found [IP: 2001:67c:1360:8001::24 80]
Ign:7 http://archive.ubuntu.com/ubuntu disco InRelease
Ign:8 http://archive.ubuntu.com/ubuntu disco-updates InRelease
Ign:9 http://archive.ubuntu.com/ubuntu disco-backports InRelease
Ign:10 http://archive.ubuntu.com/ubuntu lucid-backports InRelease
Err:11 http://archive.ubuntu.com/ubuntu disco Release
  404  Not Found [IP: 2001:67c:1562::18 80]
Err:12 http://archive.ubuntu.com/ubuntu disco-updates Release
  404  Not Found [IP: 2001:67c:1562::18 80]
Err:13 http://archive.ubuntu.com/ubuntu disco-backports Release
  404  Not Found [IP: 2001:67c:1562::18 80]
Err:14 http://archive.ubuntu.com/ubuntu lucid-backports Release
  404  Not Found [IP: 2001:67c:1562::18 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu disco-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 disco 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 disco-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://archive.ubuntu.com/ubuntu disco-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://archive.ubuntu.com/ubuntu lucid-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.

我的/etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu disco main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main universe

deb http://security.ubuntu.com/ubuntu/ disco-security universe main restricted multiverse
deb http://archive.ubuntu.com/ubuntu disco-updates universe main restricted multiverse
deb http://archive.ubuntu.com/ubuntu disco-backports universe main restricted multiverse
deb http://archive.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse

我应该从上面的文件中删除一些来源吗?哪一个?

编辑cat /etc/os-release::

NAME="Ubuntu"
VERSION="19.04 (Disco Dingo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.04"
VERSION_ID="19.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco

grep -r ^deb /etc/apt/ --include "*.list"

/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu trusty-security main universe
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/elastic-7.x.list:deb https://artifacts.elastic.co/packages/7.x/apt stable main
/etc/apt/sources.list.d/git-core-ubuntu-ppa-disco.list:deb http://ppa.launchpad.net/git-core/ppa/ubuntu disco main
/etc/apt/sources.list.d/git-core-ubuntu-ppa-disco.list:deb-src http://ppa.launchpad.net/git-core/ppa/ubuntu disco main
诺伯特

正如已经提到的,14.04 LTS(可信赖)和 19.04(迪斯科)都是 EOL。

因此,如果您想保存当前正在运行的系统,您需要首先将 sources.list 修复到迪斯科版本,然后将其升级到当前支持的版本 - 19.10 (eoan)。

首先,我们需要修复/etc/apt/sources.list正常的存储库行。您必须使用任何文本编辑器打开它pkexec gedit /etc/apt/sources.list并填充以下内容:

deb http://old-releases.ubuntu.com/ubuntu/ disco main restricted
deb http://old-releases.ubuntu.com/ubuntu/ disco-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ disco universe
deb http://old-releases.ubuntu.com/ubuntu/ disco-updates universe
deb http://old-releases.ubuntu.com/ubuntu/ disco multiverse
deb http://old-releases.ubuntu.com/ubuntu/ disco-updates multiverse
deb http://old-releases.ubuntu.com/ubuntu/ disco-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu disco-security main restricted
deb http://old-releases.ubuntu.com/ubuntu disco-security universe
deb http://old-releases.ubuntu.com/ubuntu disco-security multiverse

也不要忘记用lucidtrusty注释行并保存文件。然后更新软件包列表并安装所有升级:

sudo apt update
sudo apt dist-upgrade

然后通过运行将此系统升级到 19.10 do-release-upgrade

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章