CentOS已连接互联网但不更新

CentOS已连接互联网但不更新

我在 VMware Workstation 9 上安装了 CentOS 6.3、OpenSUSE 12.1 和 Ubuntu 12.04。当我使用其中任何一个ping检查网络连接时,我收到了正确的答案,但是当尝试使用 、和更新它们时yum,它们都会返回错误消息,例如“无法到达存储库”。yastapt-get

我一遍又一遍地更改操作系统和 VMware 中的网络设置,但没有任何反应。

同样在 CentOS(可能还有其他操作系统)中,我无法使用 Firefox 访问互联网,也无法使用 wget 获取 yahoo.com 等页面,它说:“连接到 yahoo.com (yahoo.com)|98.138.253.109|: 80...失败:连接被拒绝。”

在 Ubuntu 上我看到/看到了这个:

root@ubuntu:~# apt-get update
Err http://packages.mate-desktop.org precise InRelease
Err http://packages.mate-desktop.org precise Release.gpg
  Unable to connect to packages.mate-desktop.org:http:
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://ppa.launchpad.net precise InRelease
Err http://ppa.launchpad.net precise Release.gpg
  Unable to connect to ppa.launchpad.net: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:
Err http://us.archive.ubuntu.com precise InRelease
Err http://us.archive.ubuntu.com precise-backports InRelease
Err http://us.archive.ubuntu.com precise-updates InRelease
Err http://us.archive.ubuntu.com precise Release.gpg
  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]
Err http://us.archive.ubuntu.com precise-backports Release.gpg
  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]
Err http://us.archive.ubuntu.com precise-updates Release.gpg
  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/InRelease
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease
W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/InRelease
W: Failed to fetch http://packages.mate-desktop.org/repo/ubuntu/dists/precise/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease    
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease    
W: Failed to fetch http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu/dists/precise/InRelease    
W: Failed to fetch http://packages.mate-desktop.org/repo/ubuntu/dists/precise/Release.gpg  Unable to connect to packages.mate-desktop.org:http:    
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://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu/dists/precise/Release.gpg  Unable to connect to ppa.launchpad.net:http:    
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Unable to connect to security.ubuntu.com:http:    
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]    
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg  Unable to connect to us.archive.ubuntu.com:http: [IP: 91.189.91.14 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

您可能有一些代理/网络策略的阻碍。

对于 Ubuntu/Debian 你可以尝试这套关于通过 apt-get 使用 http 代理的说明如果你知道你有一个 http 代理。

对于 Fedora/CentOS这套使用 yum 进行代理的说明

或者这是给雅斯特的

如果事实上这是一个代理问题。

相关内容