我不断收到上述代码,一些存储库没有发布文件。完整日志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
答案1
正如前面提到的,14.04 LTS (trusty) 和 19.04 (disco) 都已过期。
因此,如果您想保存当前正在运行的系统,您需要先将 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
另外不要忘记使用清醒的和可靠并保存文件。然后使用以下命令更新软件包列表并安装所有升级:
sudo apt update
sudo apt dist-upgrade
然后通过运行将该系统升级到 19.10 do-release-upgrade
。