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.

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM