我在联想 Legion Y520(16 GB RAM,第 7 代 i7-7700HQ 处理器)上运行 Ubuntu 18.04。当我运行命令时apt-get update
,我得到以下内容:
$ sudo apt-get update
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Ign:3 http://download.opensuse.org/repositories/home:/strycore/xUbuntu_18.04 ./ InRelease
Hit:4 http://ppa.launchpad.net/arx/release/ubuntu bionic InRelease
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:6 http://download.opensuse.org/repositories/home:/strycore/xUbuntu_18.04 ./ Release
Hit:8 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [83.2 kB]
Ign:10 http://ppa.launchpad.net/gregory-hainaut/pcsx2.official.ppa/ubuntu bionic InRelease
Ign:11 http://ppa.launchpad.net/jd-team/jdownloader/ubuntu bionic InRelease
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:12 http://ppa.launchpad.net/libretro/stable/ubuntu bionic InRelease
Ign:13 http://ppa.launchpad.net/micove/console/ubuntu bionic InRelease
Hit:14 http://ppa.launchpad.net/minetestdevs/stable/ubuntu bionic InRelease
Hit:15 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic InRelease
Ign:16 http://ppa.launchpad.net/noobslab/apps/ubuntu bionic InRelease
Hit:18 http://ppa.launchpad.net/persepolis/ppa/ubuntu bionic InRelease
Hit:19 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Err:20 http://ppa.launchpad.net/gregory-hainaut/pcsx2.official.ppa/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Err:21 http://ppa.launchpad.net/jd-team/jdownloader/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Err:22 http://ppa.launchpad.net/micove/console/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Err:23 http://ppa.launchpad.net/noobslab/apps/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Get:17 http://ppa.launchpad.net/pcsx2-team/pcsx2-daily/ubuntu bionic InRelease [15.9 kB]
Reading package lists... Done
E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 2h 38min 48s). Updates for this repository will not be applied.
E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 2h 38min 53s). Updates for this repository will not be applied.
E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 2h 39min 9s). Updates for this repository will not be applied.
E: The repository 'http://ppa.launchpad.net/gregory-hainaut/pcsx2.official.ppa/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://ppa.launchpad.net/jd-team/jdownloader/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://ppa.launchpad.net/micove/console/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://ppa.launchpad.net/noobslab/apps/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: Release file for http://ppa.launchpad.net/pcsx2-team/pcsx2-daily/ubuntu/dists/bionic/InRelease is not valid yet (invalid for another 3h 41min 24s). Updates for this repository will not be applied.
问题是,最近每当我尝试添加存储库时,都会出现相同的错误:发布文件无效,并且无法安全地从此类存储库进行更新。起初,我以为存储库/程序已过时,但即使是像 Retroarch 这样的流行程序也会给我同样的错误。我尝试了至少 5 个不同的程序,结果都一样。
这是我的sources.list
:
# deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
##'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
#deb http://archive.canonical.com/ubuntu bionic partner
#deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
过去一周我一直在寻找解决方案,但一无所获。请尽可能让您的答案“对新手友好”,我还在学习。
非常感谢!
答案1
我打开了我看到的第一个http://ppa.launchpad.net/gregory-hainaut/pcsx2.official.ppa/ubuntu/dists/)查看支持哪些版本;而 bionic(18.04)不存在(即不受支持)。
您的解决方案是将其注释掉,或删除它(参考当我使用 PPA 或更新我的软件包列表时,如何修复 404 错误?了解更多信息[由 karel 提供]),然后找到另一个“修复”,无论出于什么原因你都添加了它。
使用该源代码进行发布对新手来说不太友好,因为它有风险,所以找到替代品是最容易的
仅供参考:我提供的链接来自您的输出,我刚刚导航到 dists/ 文件夹,其中可以看到每个受支持的版本(按名称,18.04 是 bionic,16.04 是 xenial(xenial 有,所以支持 16.04) ETC)。