apt-get更新无法获取文件,“暂时性故障正在解决……”错误

刘易斯
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.

这就是我尝试跑步时看到的sudo apt-get update昨天我对实例进行了更新,现在正在遇到此情况。

自由自由

概述

您的问题分为两部分:

  • 修复临时解决消息
  • 解决软件包管理问题

暂时解决

此问题很可能是:

  • 由于您的Internet服务提供商未正确将Internet命名(DNS)转发到其或外部DNS服务器,或者
  • 由于您的网络发生了变化,因此类似地阻止了此命名-例如,新的路由器/调制解调器,使用新配置重新配置交换机。

让我们看一下可能的DNS解决问题。

首先,将已知的DNS服务器临时添加到系统中。

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

然后运行sudo apt-get update

如果这可以解决您的临时解决消息,则请等待24小时以查看您的ISP是否为您解决了该问题(或者只是与您的ISP联系)-或者您可以将DNS服务器永久添加到系统中:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

8.8.8.8 是Google自己的DNS服务器。

来源

您可以使用的另一个示例DNS服务器是OpenDNS-例如:

echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

包管理问题

除了临时解决的问题-您还需要解决一些软件包管理问题-我假设您最近尝试从一个Ubuntu版本升级到下一个推荐版本-您的情况是从Natty(11.04)升级到奥尼(11.10)

打开一个终端并输入

sudo nano /etc/apt/sources.list

在列表中查找与您的预期oneiric发行版本名称不同的行(对于您的情况),您已升级到,但又有一个发行版本名称natty

例如,寻找看起来像这样的线 deb http:/archive.canonical.com/ natty backports

#在行的开头添加一个以将其注释掉-例如

#deb http:/archive.canonical.com/ natty backports

保存并重新运行:

sudo apt-get update && sudo apt-get upgrade

您不应再有任何发行版命名错误。

在写这篇的时候,可能共同发布的名称包括lucidmavericknattyoneiricprecisequantalraringsaucytrustyutopicvivid

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章