apt-get update fails to fetch files, “Temporary failure resolving …” error
来源:互联网 发布:损坏视频修复软件 编辑:程序博客网 时间:2024/06/05 21:01
https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error
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.
This is what I'm seeing when I try to run sudo apt-get update
. I did an update on my instance yesterday and am now experiencing this.
9 Answers
overview
There are two parts to your question:
- fixing temporary resolve messages
- fixing the package management issues
Temporary resolve
It is likely that this issue is either:
- temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or
- due to a change in your network has similarly blocked this naming - for example, new router/modem, reconfiguring a switch with a new configuration.
Lets look at the possible DNS resolving issues.
First, temporarily add a known DNS server to your system.
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
Then run sudo apt-get update
.
If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) - or you can permanently add a DNS server to your system:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
8.8.8.8
is Google's own DNS server.
source
Another example DNS server you could use is OpenDNS - for example:
echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
package-management issues
In addition to the temporary resolve issues - you have a few package management issues that need to be corrected - I'm assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version - in your case from Natty (11.04) to Oneiric (11.10)
Open a terminal and type
sudo nano /etc/apt/sources.list
Look for lines that have your a different distribution name in the list than you were expecting - in your case - you have upgraded to oneiric
but you have another release name natty
For example, look for lines that look like deb http:/archive.canonical.com/ natty backports
Add a #
to the beginning of the line to comment it out - for example
#deb http:/archive.canonical.com/ natty backports
Save and re-run:
sudo apt-get update && sudo apt-get upgrade
You should not have any more release naming errors.
At the time of writing this, possible common release names include lucid
, maverick
, natty
, oneiric
, precise
, quantal
, raring
, saucy
, trusty
, utopic
and vivid
.
- apt-get update fails to fetch files, “Temporary failure resolving …” error
- apt-get update 异常 Temporary failure resolving
- ubuntu apt-get 异常 Temporary failure resolving
- apt-get update报“failure resolving 'archive.ubuntu.com'”
- apt-get update报错 Failed to fetch bzip2 Some index files failed to download
- ubuntu apt-get 错误 Temporary failure resolving 'us.archive.ubuntu.com' 解决
- apt-get update 失败 ubuntu:Tempory failure resolving 'cn.archive.ubuntu.com ubuntu
- ubuntu 执行apt-get update报错Failed to fetch
- [ubuntu系列]apt-get update 出现failed to fetch
- ubuntu 执行apt-get update报错Failed to fetch
- What to do when apt-get fails
- Linux apt-get update/upgrade/install fetch error 出现404 问题
- gpg error apt-get update
- apt-get update error解决方法
- sudo apt-get update error
- Ubuntu执行sudo apt-get update出现Failed to fetch.......的问题的解决
- Unable to fetch some archives, maybe run apt-get update or try with --fix-mi
- 解决Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
- 【原】React Native踩坑系列之-Super expression must either be null or a function, not undefined
- java.lang.RuntimeException: Parcel: unable to marshal value
- log4j日志配置文件详解
- spring mvc list 参数封装
- XSS攻击及防御
- apt-get update fails to fetch files, “Temporary failure resolving …” error
- 源码 ContentProvider 的创建过程
- Swift 处理"<null>"
- mongodb高可用集群方案
- Centons7.2安装mysql-5.6.37.tar.gz(无网络)
- 根据hosts文件批量ssh-key认证及修改主机名
- 貌似有点难
- 【OpenCV开发之四】关于双目视觉系统应用开发(一)
- 编写一个JS函数,实现清除数据中重复的元素