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.
Run Code Online (Sandbox Code Playgroud)
这就是我尝试运行时所看到的sudo apt-get update
。我昨天更新了我的实例,现在正在经历这个。
fos*_*dom 238
你的问题有两个部分:
这个问题很可能是:
让我们看看可能的 DNS 解析问题。
首先,在您的系统中临时添加一个已知的 DNS 服务器。
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
Run Code Online (Sandbox Code Playgroud)
然后运行sudo apt-get update
。
如果这修复了您的临时解析消息,那么请等待 24 小时,看看您的 ISP 是否为您解决了问题(或只是联系您的 ISP) - 或者您可以将 DNS 服务器永久添加到您的系统中:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
Run Code Online (Sandbox Code Playgroud)
8.8.8.8
是 Google 自己的 DNS 服务器。
您可以使用的另一个 DNS 服务器示例是OpenDNS - 例如:
echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
Run Code Online (Sandbox Code Playgroud)
除了临时解决问题 - 您还有一些包管理问题需要更正 - 我假设您最近尝试从一个 Ubuntu 版本升级到下一个推荐版本 - 在您的情况下从 Natty (11.04) 升级到梦境 (11.10)
打开终端并输入
sudo nano /etc/apt/sources.list
Run Code Online (Sandbox Code Playgroud)
在列表中查找与您期望的发行版名称不同的行 - 在您的情况下 - 您已升级到oneiric
但您有另一个版本名称natty
例如,寻找看起来像的行 deb http:/archive.canonical.com/ natty backports
#
在行首添加 a以将其注释掉 - 例如
#deb http:/archive.canonical.com/ natty backports
保存并重新运行:
sudo apt-get update && sudo apt-get upgrade
Run Code Online (Sandbox Code Playgroud)
您不应再有任何版本命名错误。
在写这篇的时候,可能共同发布的名称包括lucid
,maverick
,natty
,oneiric
,precise
,quantal
,raring
,saucy
,trusty
,utopic
和vivid
。
Mug*_*hil 17
您可以从目录 /etc/apt/ 上找到的文件 sources.list 中评论未解决的 repo
修改sources.list后,将apt-get repo清理为
apt-get clean
Run Code Online (Sandbox Code Playgroud)
然后更新
apt-get update
Run Code Online (Sandbox Code Playgroud)
错误将消失
Gil*_*il' 15
请注意,此答案是为旧版本的 Ubuntu 编写的。当前版本使用由 D-Bus 控制的本地名称服务器,此答案的诊断部分适用,但不适用于解决方案。如果/etc/resolv.conf
包含nameserver 127.0.1.1
或更一般地nameserver 127.X.Y.Z
,不要修改它。
“临时故障解析……”表示您的DNS,即从主机名到 IP 地址的转换,没有工作。你最近在你的机器上重新配置了什么吗?如果没有,这可能是您的 ISP 的暂时性错误。
是否ping -n 8.8.8.8
显示线条64 bytes from 8.8.8.8: …
?(按Ctrl+C停止ping
。)
traceroute -n 8.8.8.8
并查看它停止的位置:如果它在您的家/办公室,请检查您的网络设备。如果您可以联系到您的 ISP,请向他们投诉。/etc/resolv.conf
;应该有一条线nameserver 1.2.3.4
(可能不止一个)。如果线路在那里,则您的 ISP 中可能存在暂时性问题,您可以通过添加nameserver 8.8.8.8
到该文件来解决它(这声明了一个额外的 DNS 服务器,由 Google 免费提供)。如果后面的第一个数字nameserver
是 127,那么您的机器上就有 DNS 中继(这是一件好事),您必须配置该 DNS 中继而不是修改/etc/resolv.conf
。在现代版本的 Ubuntu 上,默认情况下有一个 DNS 中继,它是Dnsmasq,它由 D-Bus 控制。此问题也可能是由错误命名的接口引起的。例如,Temporary failure resolving
错误消息可能是由未命名eth0
但错误命名的接口引起的eml
。
解决Temporary failure resolving
错误消息的另一种方法是选择不同的更新服务器镜像。
从 Dash 打开“软件和更新”,然后选择“Ubuntu 软件”选项卡 -> 从“下载自:”右侧的下拉菜单中选择“其他...”。
单击“选择最佳服务器”按钮以选择最佳下载服务器。
我们将进行一系列测试来找到最适合您所在位置的镜子。
单击“选择服务器”以选择推荐的服务器。
小智 5
有时,当您在代理服务器后面时,甚至有必要生成一个apt.conf
文件/etc/apt/
并在其中填充特定条目,例如:
Acquire::http::proxy "http://<yourproxyserver>:<Port>";
Acquire::https::proxy "http://<yourproxyserver>:<Port>";
Acquire::ftp::proxy "http://<yourproxyserver>:<Port>";
Run Code Online (Sandbox Code Playgroud)
如果需要身份验证,配置文件如下所示:
Acquire::http::proxy "http://<domain\user>:<password>@<yourproxyserver>:<Port>";
Acquire::https::proxy "http://<domain\user>:<password>@<yourproxyserver>:<Port>";
Acquire::ftp::proxy "http://<domain\user>:<password>@<yourproxyserver>:<Port>";
Run Code Online (Sandbox Code Playgroud)
这是一个 DNS 问题。检查你的/etc/resolv.conf
文件。
例如,就我而言,当我遇到此问题并检查此文件时,该文件是空的!但它应该包含您的 dns-nameserver
矿:
nameserver 192.168.10.x
Run Code Online (Sandbox Code Playgroud)
192.168.10.x is my gateway ip address
归档时间: |
|
查看次数: |
711347 次 |
最近记录: |