一位在大洋洲地区旅行的用户递给我一台笔记本电脑,我试图运行该命令,apt-get update
但返回了以下消息
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/restricted/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/multiverse/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/main/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/main/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/main/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/source/Sources 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/main/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/binary-i386/Packages 403 Forbidden
W: Failed to fetch http://nz.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages 403 Forbidden
E: Some index files failed to download. They have been ignored, or old ones used instead.
我直接连接到互联网运行该命令,没有通过任何代理。当我尝试访问该 URL 时,我收到“禁止访问”错误。几天前我对此没有问题。我能够解决该问题的唯一方法是将 URL 更改为http://nz.archive.ubuntu.com/ubuntu/ precise main restricted
文件http://archive.ubuntu.com/ubuntu/ precise main restricted
中的URL sources.list
。
为什么我会突然收到这样的错误?
该笔记本电脑运行的是 Ubuntu 12.04 LTS
答案1
您收到此错误是因为服务器。该服务器发生了一些变化,现在它仅提供“packages”文件作为“packages.gz”和“packages.bz2”。这完全不是您的错。
但是,我建议恢复到其他国家的服务器,而不是主 archive.ubuntu.com,因为它受到限制,无法体验全速。
答案2
是的,nz.archive.ubuntu.com
由于某种原因返回了 403 Forbidden。也许他们的服务器配置有误。也许您处于黑名单子网中。尝试在浏览器中打开该 URL。您也可以联系此镜像站点的所有者来报告此问题。您可以使用另一个镜像。Ubuntu 上有很多这样的镜像。