我从 Ubuntu 12.04 升级到了 Ubuntu 12.10。升级后无法更新。软件更新程序给出以下错误:
W:Failed to fetch http://archive.canonical.com/ubuntu/dists/precise/Release.gpg Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://extras.ubuntu.com/ubuntu/dists/quantal/Release.gpg Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/Release.gpg Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-updates/Release.gpg Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/Release.gpg Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-security/Release.gpg Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-proposed/Release.gpg Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/restricted/source/Sources Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/main/source/Sources Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/multiverse/source/Sources Unable to connect to 10.4.42.15:8080:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal/universe/source/Sources Unable to connect to 10.4.42.15:8080:
:
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-proposed/universe/i18n/Translation-en Unable to connect to 10.4.42.15:8080:
E:Some index files failed to download. They have been ignored, or old ones used instead.
我无法从软件中心安装任何东西;它只是要求使用这个来源,然后它只是继续查询软件源,什么也没有发生。
其内容/etc/apt/sources.list
为:
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ quantal main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal restricted main multiverse universe #Added by software-properties
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ quantal-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-updates restricted main multiverse universe #Added by software-properties
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ quantal universe
deb http://us.archive.ubuntu.com/ubuntu/ quantal-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ quantal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ quantal-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-backports main restricted universe multiverse #Added by software-properties
deb http://us.archive.ubuntu.com/ubuntu/ quantal-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-security restricted main multiverse universe #Added by software-properties
deb http://us.archive.ubuntu.com/ubuntu/ quantal-security universe
deb http://us.archive.ubuntu.com/ubuntu/ quantal-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu quantal main
deb-src http://extras.ubuntu.com/ubuntu quantal main
# deb http://download.learnfree.eu/repository/skss / #SKSS
# deb-src http://download.learnfree.eu/repository/skss / #SKSS
deb http://us.archive.ubuntu.com/ubuntu/ quantal-proposed restricted main multiverse universe
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-proposed restricted main multiverse universe #Added by software-properties
答案1
我终于找到了解决 ubuntu 12.10 无法更新问题的方法。实际上是代理出了问题,所以我做了如下操作:
我跑去gksudo gedit /etc/apt/apt.conf
编辑apt.conf
文件,然后
在文件中添加以下行apt.conf
:
Acquire::http::Proxy "false";
现在一切都像以前一样顺利。
答案2
听起来像是互联网问题。(Unable to connect to X.X.X.X:XXXX:
)尝试禁用防火墙,并退出您可能正在使用的任何代理。如果这不能解决问题,我建议更改您的 DNS。您的 ISP 可能为您提供了一个不可靠的 DNS 服务器(或者您可能手动设置了一个不可靠的 DNS 服务器。;)
无论如何,要做到这一点,只需将您的 DNS 服务器设置为208.67.222.222, 208.67.220.220
(即 OpenDNS;还有其他的。选择一个你喜欢的,但最重要的是,选择一个作品)如果你不知道如何操作,可以查看详细说明这里。
答案3
我自己在使用 Ubuntu 12.10 时也遇到过这个问题。在尝试修复这个问题时要小心谨慎 - 我最终重新安装了 12.04 来修复我的机器。话虽如此,Launchpad 上有一个错误报告(抱歉,找不到它),解释了 Ubuntu 12.10 如何默认启用 DNS 功能 dnsdmasq,这会搞乱很多系统。本文介绍了如何禁用 dnsdmaq。http://www.ubuntugeek.com/how-to-disable-dnsmasq-in-ubuntu-12-04precise.html
文章逐字逐句摘录如下:“
您需要编辑 /etc/NetworkManager/NetworkManager.conf 文件
$ gksudo gedit /etc/NetworkManager/NetworkManager.conf
并注释掉以下行
dns=dnsmasq
到
#dns=dnsmasq
保存并退出文件
现在你需要使用以下命令来管理网络
$sudo restart network-manager
“
希望有所帮助。
答案4
在软件源配置的其他选项卡中,尝试取消选中以下内容
1. Canonical Partners (Source Code)
2. Independent (Source Code)
3. Independent
如果有效,那就太好了。但请记住定期启用这些存储库以检查它们是否已解决问题。