我有一个新的 12.04 服务器实例,但运行过程中遇到问题sudo apt-get update
更新似乎工作正常,然后它会停止并等待标题,然后开始吐出 404 错误。
我已经在我的 sources.list 中尝试了以下 repos,其中 precise 和 precise-updates 等也定义为同一个镜像:
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://uk.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
404 错误随机出现,有时在 Get:100 处停止,有时在 Get:400+ 处停止
我现在已经尝试了一个完全不同的镜像(mirrors.coreix.net),这似乎持续的时间更长,但是过了一段时间后它现在挂起了等待标题。
有什么想法吗?我在论坛上搜索了很多遇到类似问题的人,但这里似乎没有任何内容可以帮助我...
也许还值得注意的是,这是在公司网络上,我目前让网络团队检查我们的内部名称服务器是否存在某种 DNS 问题,但我可以运行host google.com
并ping google.com
得到适当的响应,没有丢失数据包或任何东西。
编辑:这是刚刚完成的最后一次尝试的最后几行。
Get:450 http://mirrors.coreix.net precise-security/main Translation-en [168 kB]
Get:451 http://mirrors.coreix.net precise-security/multiverse Translation-en [1,299 B]
Get:452 http://mirrors.coreix.net precise-security/restricted Translation-en [1,253 B]
Get:453 http://mirrors.coreix.net precise-security/universe Translation-en [56.3 kB]
Get:454 http://mirrors.coreix.net precise-updates/main amd64 Packages [745 kB]
Get:455 http://mirrors.coreix.net precise-updates/universe amd64 Packages [231 kB]
Get:456 http://mirrors.coreix.net precise-updates/main i386 Packages [769 kB]
Get:457 http://mirrors.coreix.net precise-updates/universe i386 Packages [236 kB]
Get:458 http://mirrors.coreix.net precise-updates/main Translation-en [334 kB]
Get:459 http://mirrors.coreix.net precise-updates/multiverse Translation-en [8,293 B]
Get:460 http://mirrors.coreix.net precise-updates/restricted Translation-en [2,859 B]
Get:461 http://mirrors.coreix.net precise-updates/universe Translation-en [135 kB]
Err http://mirrors.coreix.net precise-security/universe amd64 Packages
404 Not Found
Err http://mirrors.coreix.net precise-security/main i386 Packages
404 Not Found
Err http://mirrors.coreix.net precise-updates/main amd64 Packages
404 Not Found
Err http://mirrors.coreix.net precise-updates/universe amd64 Packages
404 Not Found
Err http://mirrors.coreix.net precise-updates/main i386 Packages
404 Not Found
Err http://mirrors.coreix.net precise-updates/universe i386 Packages
404 Not Found
Get:462 http://mirrors.coreix.net precise/main Translation-en [726 kB]
Get:463 http://mirrors.coreix.net precise/multiverse Translation-en [93.4 kB]
Get:464 http://mirrors.coreix.net precise/restricted Translation-en [2,018 B]
Get:465 http://mirrors.coreix.net precise/universe Translation-en [3,341 kB]
Get:466 http://mirrors.coreix.net precise-security/main Translation-en [168 kB]
Get:467 http://mirrors.coreix.net precise-security/universe Translation-en [56.3 kB]
Get:468 http://mirrors.coreix.net precise-updates/main Translation-en [334 kB]
Get:469 http://mirrors.coreix.net precise-updates/multiverse Translation-en [8,293 B]
Get:470 http://mirrors.coreix.net precise-updates/universe Translation-en [135 kB]
Err http://mirrors.coreix.net precise/main Translation-en
Connection failed
Get:471 http://mirrors.coreix.net precise/multiverse Translation-en [93.4 kB]
Err http://mirrors.coreix.net precise/multiverse Translation-en
Connection failed
Err http://mirrors.coreix.net precise/universe Translation-en
Connection failed
Err http://mirrors.coreix.net precise-security/main Translation-en
Connection failed
Get:472 http://mirrors.coreix.net precise-security/universe Translation-en [56.3 kB]
Err http://mirrors.coreix.net precise-security/universe Translation-en
Connection failed
Err http://mirrors.coreix.net precise-updates/main Translation-en
Connection failed
Get:473 http://mirrors.coreix.net precise-updates/universe Translation-en [135 kB]
Err http://mirrors.coreix.net precise-updates/universe Translation-en
Connection failed
Fetched 12.8 MB in 1h 39min 45s (2,143 B/s)
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/universe/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/universe/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/universe/binary-i386/Packages 404 Not Found
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise/main/i18n/Translation-en Connection failed
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise/multiverse/i18n/Translation-en Connection failed
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise/universe/i18n/Translation-en Connection failed
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/main/i18n/Translation-en Connection failed
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/universe/i18n/Translation-en Connection failed
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/main/i18n/Translation-en Connection failed
W: Failed to fetch gzip:/var/lib/apt/lists/partial/mirrors.coreix.net_ubuntu_dists_precise-updates_multiverse_i18n_Translation-en Encountered a section with no Package: header
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/universe/i18n/Translation-en Connection failed
E: Some index files failed to download. They have been ignored, or old ones used instead.
admin@SNOAP01:/etc$
答案1
可能是某些服务器暂时停机 — 因为维护。或者某些软件包/存储库不再提供(例如 medibuntu)。
因此,您可以通过菜单项“系统工具”启动更新管理器。然后在更新管理器菜单中单击“编辑” - 选择“软件源”。然后,您可以在“其他软件”选项卡中的“软件和更新”列表中检查挂钩设置过多或缺少挂钩的位置。
在终端中你可以使用 ... 进行检查:
sudo apt-get 更新
哪个条目导致了有关服务器的错误消息。
然后您就知道在“其他软件”中哪里应该设置缺少的钩子或者在哪里应该删除钩子。
答案2
好的 - 经过一番调查,由于我们在网络内以某种奇怪的方式过滤流量,我为此服务器提供的名称服务器无法正确传递请求。我添加了一个我知道绕过此过滤器的代理,使用/etc/environment
http_proxy=ip.of.proxy.server:port,然后就好了!现在它正常工作了。
我发布此信息是希望它能帮助其他有类似头痛的人!