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.

Ubuntu虚拟机可以上网,可以ping网络,但是无法update和install,报连接不上服务器的错误解决方案:的更多相关文章

  1. VMware Workstation下ubuntu虚拟机无法上网连不上网络解决

    写在前面:本博客为本人原创,严禁任何形式的转载!本博客只允许放在博客园(.cnblogs.com),如果您在其他网站看到这篇博文,请通过下面这个唯一的合法链接转到原文! 本博客全网唯一合法URL:ht ...

  2. ubuntu虚拟机和主机互ping及secureCRT使用

    1.首先使用ifconfig查看IP,如果没有IP的话就配置IP,配置的IP要和主机在一个网段,可以使用ipconfig查看主机(WIN7)的ip地址. 2.根据ifconfig列出的网卡配置IP地址 ...

  3. 主机+虚拟机ubuntu+mini2440开发板互相ping通

    折腾这么久,终于将主机,虚拟机和开发板三者之间能够相互ping通,虽然还没有实现我要的功能,不管怎么说先将步骤简单的概括下,用交叉网线将开发板与主机相连,开发板与主机的ip要设置在同一网段内,在配置u ...

  4. windows主机与virtualbox虚拟机下的Linux共享网络

    环境: 主机:windows7 虚拟机:virtualbox 4.2 虚拟系统:CentOS6.2 需求: 1.虚拟机linux可以共享主机网络上互联网 2.主机.虚拟机互通讯,组成一个虚拟的局域网, ...

  5. (转)windows宿主机,ubuntu虚拟机下的上网设置(有线网络和无线网络)

    转自:http://hi.baidu.com/puppywst/item/d9f73734856e2af32684f4e3 虚拟机下ubuntu共享方式上网: 有线网络 在有线网络的条件下,vmwar ...

  6. VMware虚拟机下Ubuntu连不上网解决

    虚拟机:VMware® Workstation 12 Pro Ubuntu: 14.04 问题描述:电脑从公司拿到家打开Ubuntu之后,打开自带Firefox浏览器,显示连接不上网,终端下ping ...

  7. 一次Ubuntu16.04 虚拟机挂起,ping不到网络引发的思考

    虚拟机挂起 无网络 情况复现 can@ubuntu:~$ ping www.baidu.com ping: unknown host www.baidu.com 挂起重开虚拟机,遇到无网络状态: 首先 ...

  8. Ubuntu杂记——Ubuntu下用虚拟机共享上网

    由于最近把自己电脑环境换成了Ubuntu,但学校的网络是电信的闪讯,大学里用过的人都知道这货有多坑,而且没有Linux客户端,上网都是问题,怪不得国内用Linux的人那么少,特别是高校的学生(让我瞎逼 ...

  9. linux中配置桥接网络,让虚拟机能够上网

    使用桥接模式最主要的目的就是让虚拟机也能上网,从而有了这篇文章. 1.设置虚拟机的网络连接方式 在设置虚拟机网线的连接方式的时候,注意第一个选择桥接模式,第二个界面名称必须使用和宿主机相同的网卡,然后 ...

随机推荐

  1. php解决表单重复提交

    php解决表单重复提交时间:2015-2-28 | 评论:1条评论 | 被查看了 189 次 | 标签:php, W3cui重复提交是我们开发中会常碰到的一个问题,除了我们使用js来防止表单的重复提交 ...

  2. workday1

    前天是实习的第一天,现在补下感想 总的来说还是不错的,师兄很nice,师妹很羞涩,我很尴尬,我的交际能力还是有待提高(主要是普通话不标准~~~~(>_<)~~~~) 早上由华工C12穿梭到 ...

  3. C++ inline函数与编译器设置

    1. 经过测试#define与inline的速度几乎没有区别. 2. inline函数更为安全,有效避免了#define二义性问题.inline是真正的函数,而#define只是在字符串意义上的宏替换 ...

  4. Nio经典工作方式

    public void selector() throws IOException { ByteBuffer buffer = ByteBuffer.allocate(1024); Selector ...

  5. Chrome浏览器扩展开发系列之二:Google Chrome浏览器扩展的调试

    1)      查看扩展程序的详细信息和ID 通过Chrome 浏览器的“ 工具->更多工具->扩展程序”,打开chrome://extensions页面,选中右上角的“开发者模式”,可以 ...

  6. var与let的区别

    var与let的区别 前言: 在没接触Es6之前,我们在js中声明都是通过var来声明变量的,var声明变量虽说方便,但是,又有一些自己的诟病,下边来说一说,这三个的区别! var var相信大家都不 ...

  7. java IO之 字符流 (字符流 = 字节流 + 编码表) 装饰器模式

    字符流 计算机并不区分二进制文件与文本文件.所有的文件都是以二进制形式来存储的,因此, 从本质上说,所有的文件都是二进制文件.所以字符流是建立在字节流之上的,它能够提供字符 层次的编码和解码.列如,在 ...

  8. 小解系列-解决WebUploader在谷歌浏览器下弹出框打开慢,在Bootstrap模态框内部多次点击才能触发的问题

    WebUploader百度前端团队开源的上传组件,用起来感觉真心不错的,标题的两个问题是我实际使用过程中遇到的问题,经过百度和谷歌查到解决方案, 特分享一下,以供遇到此问题的童靴. 谷歌浏览器弹出框打 ...

  9. SpringMvc支持跨域访问,Spring跨域访问,SpringMvc @CrossOrigin 跨域

    SpringMvc支持跨域访问,Spring跨域访问,SpringMvc @CrossOrigin 跨域 >>>>>>>>>>>> ...

  10. 开发servlet三种方式

    第一种:实现Servlet接口 ServletDemo类 实现Servlet接口 public class ServletDemo implements Servlet { //初始化该servlet ...