ubuntu12.04 apt-get upgrade失败的问题

来源:互联网 发布:rfid reader软件 编辑:程序博客网 时间:2024/06/06 02:15

今天,维护自己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 InReleaseErr http://gb.archive.ubuntu.com oneiric-updates InReleaseErr http://gb.archive.ubuntu.com natty-backports InReleaseErr 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... DoneW: 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.

看了好几个外文网站,找到了解决方案:

最简单的解决方案:

修改/etc/resolv.conf文件:

nameserver=8.8.8.8

保存,重新执行apt-get update成功! 


请参考该文档:http://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error



原创粉丝点击