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.
相關文章
相關標籤/搜索