2015-10-20 83 views
1

我在嘗試運行一個Debian或Ubuntu泊塢窗圖像apt-get的更新時,這個奇怪的錯誤:apt-get的基於Debian和Ubuntu泊塢窗圖像失敗

[email protected]:/# 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. 

我查了一下網址不存在,它應該是.gz或.bz2來代替。它只發生在一臺主機服務器上(運行Ubuntu),在boot2docker和Debian中工作良好。

回答

0

我發現這是由於我們在將端口80重定向到localhost端口5000的服務器上設置的IP表規則。它是在兩個方向上意外設置的。

apt-get請求的URL沒有.gz/.bz2,因爲它已經失敗了。

0

由於您的實例的網絡問題,您收到Failed to fetch錯誤。它最有可能是高速緩存代理或壞鏡子。解決此問題的最簡單方法是使用VPN連接從其他地理位置獲取軟件包更新,這將觸發不同的鏡像。