ubuntu12.04 apt-get upgrade失敗的問題
阿新 • • 發佈:2019-02-13
今天,維護自己ubuntu伺服器,使用apt-get upgrade更新源,但是出現下面的失敗資訊:
Err http://archive.canonical.com natty InRelease Err http://security.ubuntu.com oneiric-security InRelease Err http://extras.ubuntu.com natty InRelease Err http://security.ubuntu.com oneiric-security Release.gpg Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.
看了好幾個外文網站,找到了解決方案:
最簡單的解決方案: