与上述说明相反,我尚未找到解决问题的答案。
我已经阅读了将近十二个“易于获取”更新问题,其中大部分来自askubuntu.com,其中包含“无法提取”错误,并尝试了在那里解决的方法。不幸的是,没有一个有效。我最近刚刚在笔记本电脑上安装了Ubuntu 12.04,并与Windows 7一同启动。
sudo apt-get update
在终端上,不断发生以下情况:
Err http://ph.archive.ubuntu.com precise InRelease
Err http://ph.archive.ubuntu.com precise-updates InRelease
Err http://ph.archive.ubuntu.com precise-backports InRelease
Err http://ph.archive.ubuntu.com precise Release.gpg
Unable to connect to ph.archive.ubuntu.com:http: [IP: 91.189.92.177 80]
Err http://ph.archive.ubuntu.com precise-updates Release.gpg
Unable to connect to ph.archive.ubuntu.com:http: [IP: 91.189.92.177 80]
Err http://ph.archive.ubuntu.com precise-backports Release.gpg
Unable to connect to ph.archive.ubuntu.com:http: [IP: 91.189.92.177 80]
Err http://extras.ubuntu.com precise InRelease
Err http://extras.ubuntu.com precise Release.gpg
Unable to connect to extras.ubuntu.com:http:
Err http://security.ubuntu.com precise-security InRelease
Err http://security.ubuntu.com precise-security Release.gpg
Unable to connect to security.ubuntu.com:http: [IP: 91.189.92.190 80]
Reading package lists... Done
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise/InRelease
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/InRelease
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Unable to connect to ph.archive.ubuntu.com:http: [IP: 91.189.92.177 80]
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Unable to connect to ph.archive.ubuntu.com:http: [IP: 91.189.92.177 80]
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Unable to connect to ph.archive.ubuntu.com:http: [IP: 91.189.92.177 80]
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg Unable to connect to extras.ubuntu.com:http:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Unable to connect to security.ubuntu.com:http: [IP: 91.189.92.190 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
注意事项:
我安装Ubuntu 12.04之后立即发生了这种情况。对于Linux / Ubuntu领域,我是一个新手,对这些东西来说是个菜鸟。
Update Manager(和Software Center)设置中的Sources列表很短。它仅包含2行带有“ Canonical”的行,2行带有“ Independent”的行和其他2行。我认为列表很短,因为它是新安装的Ubuntu。
与互联网的连接似乎很好,我的朋友的笔记本电脑与我的大约同时安装了Ubuntu 12.04,他的更新似乎没有问题。我们共享相同的连接,所以我认为互联网连接问题不可能是该错误的原因。
尝试的解决方案:
在这里,我进行了探索,/etc/resolvconf/resolv.conf.d
并添加/etc/resolvconf/resolv.conf.d/head
了以下内容:
nameserver 8.8.8.8
nameserver 8.8.4.4
仍然发生错误。
在这里和这里,我反复更改了在更新管理器和“软件”源设置中使用的镜像服务器。同样,错误仍然发生。
我还尝试编辑源列表,取消选中带有“独立”字样的行(如建议)。根据这里,我尝试删除derb-src
源列表中的行。仍然无济于事。
最后,该站点建议运行以下命令:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
or, for a permanent solution,
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
可悲的是,没有任何东西对我有用。在我去过的所有论坛中,与之相关的答案nameserver 8.8.8.8
似乎最经常出现。还请注意,我真的不了解解决方案,它们的含义或完成方式。我只是跟随他们。
这是输出cat /etc/apt/sources.list
:
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu precise main restricted
deb-src http://archive.ubuntu.com/ubuntu precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted
## 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://archive.ubuntu.com/ubuntu precise universe
deb-src http://archive.ubuntu.com/ubuntu precise universe
deb http://archive.ubuntu.com/ubuntu precise-updates universe
deb-src http://archive.ubuntu.com/ubuntu precise-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://archive.ubuntu.com/ubuntu precise multiverse
deb-src http://archive.ubuntu.com/ubuntu precise multiverse
deb http://archive.ubuntu.com/ubuntu precise-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-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://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu precise-security main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted
deb http://archive.ubuntu.com/ubuntu precise-security universe
deb-src http://archive.ubuntu.com/ubuntu precise-security universe
deb http://archive.ubuntu.com/ubuntu precise-security multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-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 precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
以下是针对cat /etc/resolv.conf
:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search nip.upd.edu.ph
有人指出,答案就在这里,但不幸的是,它也不起作用。我尝试选择其他服务器,但“选择服务器”从未可用。搜索最佳服务器会产生“没有合适的服务器”的结果。我认为镜像服务器很好,而且互联网连接似乎没有问题。
使用ping -c3 archive.ubuntu.com
和ping -c3 8.8.8.8
都产生了0% packet loss
。8.8.8.8的ping有时会产生,33% packet loss
但大部分为0%。
打字nslookup google.com
收益
Server: 127.0.0.1
Address: 127.0.0.1#53
输出ps aux | grep dns
:
nobody 1761 0.0 0.0 33012 1284 ? S 17:04 0:00 /usr/sbin/dnsmasq
--no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var
/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-
file=/var/run/nm-dns-dnsmasq.conf --cache-size=0 --proxy-dnssec
joa 2197 0.0 0.0 13576 928 pts/0 S+ 17:10 0:00 grep --color=auto dns
nslookup google.com
,并发布的输出ps aux | grep dns
吗?另外,您是否使用静态IP?
ps aux | grep dns
应该是一行,但是我对其进行了编辑以使其更易于查看。最初,我会说我使用动态IP是因为我没有为它支付任何费用,但是我使用大学互联网连接,因此很难知道我使用的IP是静态的还是动态的。
sudo apt-get update
吗?另外,还可以包括输出cat /etc/apt/sources.list
和cat /etc/resolv.conf
?您确认可以正常浏览互联网上的网站吗?