无法获取http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources 404找不到[IP:91.189.91.26 80]


9

我正在使用Ubuntu 16.04 LTS。今天早上,当我跑步时sudo apt-get update,我遇到了以下错误:

W: The repository 'http://us.archive.ubuntu.com/ubuntu lucid Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources  404  Not Found [IP: 91.189.91.26 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

我已经在互联网上找到了答案。尽管我确实找到了一些类似的帖子,但是所有解决方案都不适合我。我尝试过的一种有趣的解决方案是:

最简单的解决方案是执行以下两个步骤:

1-备份您的源列表-> sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

2-打开源文件“ /etc/apt/sources.list”,将us.archive的所有实例重命名或归档http://us.archive.ubuntu.com/ubuntu/

http://old-releases.ubuntu.com/ubuntu/

也对 http://security.ubuntu.com/ubuntu/dists/saucy-security/universe/binary-i386/Packages

3-完成上述操作后,运行sudo apt-get update。

猜猜是什么..没有用。实际上,它引发了更多错误:

W: The repository 'http://old-releases.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://old-releases.ubuntu.com/ubuntu xenial-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://old-releases.ubuntu.com/ubuntu xenial-backports Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://old-releases.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://us.archive.ubuntu.com/ubuntu lucid Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/xenial-security/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources  404  Not Found [IP: 91.189.91.23 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

请帮忙。

编辑:

这是我的原始sources.list:

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## 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
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://in.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial universe
deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-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://in.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://in.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-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://in.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ xenial-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 xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse


1
@mikewhatever重复项无效-OP的问题不是选择“最快的镜像”,而是他们试图解决Lucid存储库警告问题,并且在此过程中破坏了Xenial设置。
托马斯·沃德

Answers:


13

您在这里犯了一些严重的错误。

首先,您正在运行16.04。这意味着您不能盲目地将普通存档镜像替换为old-releases。这就是为什么您当前遇到有关Xenial仓库遗失的错误的原因。

其次,您仍在尝试从Lucid存储库中提取内容。这对您无济于事,因为Lucid存储库中的大部分项目在Xenial中将无法使用,或者由于各种原因而从存储库中删除,或者被更新的版本所取代。而且,您对旧版本遵循的说明适用于您在配置中使用的Lucid存储库行。


这是解决您遇到的问题的方法。

  1. 进行检查/etc/apt/sources.list,然后开始old-releases.ubuntu.com用您的原始镜像替换所有条目us.archive.ubuntu.com
  2. 找到引用的行lucid并将其注释掉,或old-releases.ubuntu.com 仅用于该存储库

    如果您不知道哪个条目/etc/apt/sources.list或其中/etc/apt/sources.list.d/*有此“清醒”条目,请从/etc/apt/grep -r -i lucid /etc/apt/; 运行此命令。它将识别包含单词“ lucid”的文件

  3. sudo apt-get update 现在类似的命令应该可以正常工作了。

我强烈建议您注释掉Lucid存储库,因为它们也是生命周期的尽头,除非您真的需要它们,否则不要激活它们。


我找不到任何行引用lucid。我已经编辑了问题,并添加了我的sources.list。你能看看吗?
utkarsh2k2

还要检查/etc/apt/sources.list.d/中的所有位置。 在某个地方有Lucid,或者您不会得到刚开始时遇到的错误。考虑也尝试一下apt-get update,看看错误是否已解决。(用于grep -r -i lucid /etc/apt/查找任何清晰的引用)
Thomas Ward

找到了。里面有2个参考/etc/apt/sources.list.d/alternative_Repo.list。在注释掉它们之后,错误现在消失了。
utkarsh2k2
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.