Ubuntu虚拟机能够上网,能够ping网络,可是没法update和install,报链接不上服务器的错误解决方案:

http://askubuntu.com/questions/711889/err-apt-get-update-on-ubuntu-14-04


即便给Ubuntu配置了代理,terminal能ping通网络,火狐浏览器能上网,但依然连不上网络安装软件和update,报下面的错,

解决方案是:

Create /etc/apt/apt.conf to add proxy configuration for APT.

sudo nano /etc/apt/apt.conf
Add this line to your /etc/apt/apt.conf file

Acquire::http::Proxy "http://proxyaddress:proxyport";
Save it with Ctrl+X, Y and retry:

sudo apt-get update

  

sudo apt-get update
Err http://extras.ubuntu.com trusty InRelease                                  

Err http://extras.ubuntu.com trusty Release.gpg                                
  Cannot initiate the connection to extras.ubuntu.com:80 (2001:67c:1360:8c01::23). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::23 80]
Err http://us.archive.ubuntu.com trusty InRelease                              

Err http://us.archive.ubuntu.com trusty-updates InRelease                      

Err http://us.archive.ubuntu.com trusty-backports InRelease                    

Err http://us.archive.ubuntu.com trusty-proposed InRelease                     

Err http://us.archive.ubuntu.com trusty Release.gpg                            
  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]
Err http://us.archive.ubuntu.com trusty-updates Release.gpg
  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]
Err http://us.archive.ubuntu.com trusty-backports Release.gpg
  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]
Err http://us.archive.ubuntu.com trusty-proposed Release.gpg
  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]
Err http://security.ubuntu.com trusty-security InRelease

Err http://security.ubuntu.com trusty-security Release.gpg
  Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::17). - connect (101: Network is unreachable) [IP: 2001:67c:1562::17 80]
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease  

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-proposed/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Cannot initiate the connection to extras.ubuntu.com:80 (2001:67c:1360:8c01::23). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::23 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-proposed/Release.gpg  Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) [IP: 2001:67c:1562::15 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::17). - connect (101: Network is unreachable) [IP: 2001:67c:1562::17 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.
相关文章
相关标签/搜索