apt get在基于Debian和Ubuntu的docker映像中失败
在Debian或Ubuntu docker映像中运行apt get update时,我遇到了一个奇怪的错误:apt get在基于Debian和Ubuntu的docker映像中失败,docker,debian,http-status-code-404,apt-get,Docker,Debian,Http Status Code 404,Apt Get,在Debian或Ubuntu docker映像中运行apt get update时,我遇到了一个奇怪的错误: root@60931d7602e1:/# apt-get update Ign http://security.debian.org jessie/updates InRelease Ign http://httpredir.debian.org jessie InRelease Ign http://security.debian.org jessie/updates Release.
root@60931d7602e1:/# apt-get update
Ign http://security.debian.org jessie/updates InRelease
Ign http://httpredir.debian.org jessie InRelease
Ign http://security.debian.org jessie/updates Release.gpg
Ign http://httpredir.debian.org jessie-updates InRelease
Ign http://security.debian.org jessie/updates Release
Ign http://httpredir.debian.org jessie Release.gpg
Err http://security.debian.org jessie/updates/main amd64 Packages
Ign http://httpredir.debian.org jessie-updates Release.gpg
Err http://security.debian.org jessie/updates/main amd64 Packages
Ign http://httpredir.debian.org jessie Release
Err http://security.debian.org jessie/updates/main amd64 Packages
Ign http://httpredir.debian.org jessie-updates Release
Err http://security.debian.org jessie/updates/main amd64 Packages
Err http://security.debian.org jessie/updates/main amd64 Packages
404 NOT FOUND [IP: 149.20.20.6 80]
Err http://httpredir.debian.org jessie/main amd64 Packages
404 NOT FOUND [IP: 176.9.184.93 80]
Err http://httpredir.debian.org jessie-updates/main amd64 Packages
404 NOT FOUND [IP: 176.9.184.93 80]
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages 404 NOT FOUND [IP: 149.20.20.6 80]
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 NOT FOUND [IP: 176.9.184.93 80]
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 NOT FOUND [IP: 176.9.184.93 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
我检查过,URL不存在,应该是.gz或.bz2。它只发生在一台主机服务器上(运行Ubuntu),目前在boot2docker和Debian中运行良好。我发现这是由于我们在服务器上设置了IP表规则,该规则将端口80重定向到本地主机端口5000。它是在两个方向上意外设置的
apt get正在请求不带.gz/.bz2的URL,因为它已经失败了。您收到的
无法获取错误是因为您的实例存在网络问题。最可能是缓存代理或坏镜像。解决此问题的最简单方法是使用VPN连接从其他地理位置获取更新包,这将触发不同的镜像