apt-get碰上了”fetch http://……失败”, 自带源在国内连接性不好。

解决:改用”阿里云Ubuntu源”:

https://www.yurendu.com/code/16.html

命令如下:

1、备份

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2、修改源:

sudo vim /etc/apt/sources.list 进入vim修改sources.list,在将如下代码:

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

输入之前之前,把相对应的原有的源用#注释掉。

3、更新列表, 成功

sudo apt-get update

本文版权归郑鹏(默盒)和博客园共有,原创文章,未经允许不得转载,否则保留追究法律责任的权利。

Ubuntu apt-get update 失败的更多相关文章

  1. Ubuntu系统 apt-get update失败解决办法

    使用apt-get的时候发现ubuntu和阿里云均已经不提供该版本的源,所以需要找到其他的替代源. 使用的ubuntu版本是14.10,属于非LTS(长期支持版本),因此前一段时间还可以使用apt-g ...

  2. ubuntu sudo apt-get update 失败 解决方法

    sudo apt-get update 报了一堆错误: Err http://cn.archive.ubuntu.com trusty InRelease Err http://cn.archive. ...

  3. ubuntu apt-get update失败 解决方法

    ubuntu apt-get update失败 1.出现错误:E:Could not get lock /var/lib/apt/lists/lock - open (11: Resource tem ...

  4. Ubuntu 16.04 LTS: apt-get update 失败处理 Aborted (core dumped)

    在Ubuntu 16.04运行sudo apt-get update出现如下错误: rogn@ubuntu:~$ sudo apt-get update Get:1 http://us.archive ...

  5. ubuntu apt 命令参数(转)

    apt-get是一条linux命令,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索.安装.升级.卸载软件或操作系统. apt-get update 在修改/etc/apt/sou ...

  6. apt get update无法正常使用解决方案(转载)

    apt get update无法正常使用 解决方法参考博客 [问题描述] 前几天执行apt相关命令(如apt-get update),都会长时间停在``等待报头'',超时后,显示连接超时. 换了快速指 ...

  7. ubuntu apt出错

    whitedream@ubuntu:~$ sudo apt-get update Reading package lists... Done E: Could not get lock /var/li ...

  8. 解决配置Windows Update失败问题

    大家都清楚电脑总是需要更新一些补丁,不过,很多系统用户发现更新了补丁之后,开机会出现windows update更新失败的情况,提示“配置Windows Update失败,还原更改,请勿关闭计算机”信 ...

  9. 解决配置Windows Update失败,还原更改问题

    问题描述 由于配置Windows Update失败,还原更改状态下无法正常关机.只能长按电源键关机后进入WinPE环境. 解决步骤 进入WinPE环境->选择Dism++->选择版本-&g ...

  10. ssh 报错Host key verification failed 或Ubuntu connect to serve 失败

    ssh 报错Host key verification failed  或Ubuntu connect to serve 失败  通常是因为没有装ssh sudo apt-get install  o ...

随机推荐

  1. Agile&DevOps究竟谁是魔法棒

    天下没有神奇的配方 很抱歉,文章的开头我就要说出这个残酷的事实 - 世界上没有任何工具可以魔法般的让你实现敏捷,精益,DevOps.如果只是依赖了工具的自动化,实现了自动化Dev或者Ops,那么别忘了 ...

  2. 微信小程序知识总结及案例集锦

    微信小程序知识总结及案例集锦 微信小程序的发展会和微信公众号一样,在某个时间点爆发 学习路径 微信小程序最好的教程肯定是官方的文档啦,点击这里直达 微信官方文档 认真跟着文档看一遍,相信有vue前端经 ...

  3. vue--指令中值得随笔的地方

    v-model-- 双向数据绑定 number修饰指令 <!DOCTYPE html> <html lang="en"> <head> < ...

  4. QQ空间魔力日志大全SduSRZ

    大家好~最近,在QQ空间里出现了一种神奇的日志,谁看显示谁的信息,在个人中心显示的是一张图片,在日志里显示的又是另一张图片.这就是传说中的魔力日志.魔力日志从今年的9月份开始盛行,因为具有谁看就针对谁 ...

  5. 实现一个栈类,类似STL中的栈

    1.思路讲解 stack集合类是一个简单的堆栈的实现. 这里有两个模板参数,T和size,T用于指定堆栈中的元素类型,my_size用于表示堆栈中项数的最大值. 类中添加方法isempty.isful ...

  6. OCP 11G 实验环境安装文档 ( RedHat5.5 + Oracle11g )

    RedHat5.5 linux下Oracle11g软件安装 一.配置虚拟机 为了创建和配置虚拟机,你需要添加硬件设备如磁盘和cpu,在你开始安装之前,创建一个windows目录作为存放虚拟机的目录 目 ...

  7. 没有绝对安全的系统:写在AES 256破解之后

    NULL 在理论上,理论和实践是一致的.在实践中,呵呵. ——(应该是)爱因斯坦(说的) (INFO:本文中不会出现公式,请放心阅读) AES 256被破解了? 对于TLNR(Too Long, No ...

  8. 各种demo:css实现三角形,css大小梯形,svg使用

    各种demo: 1.css实现正方形 思路:width为0:height为0:使用boder-width为正方形的边长的一半,不占任何字节:border-style为固体:border-color为正 ...

  9. 【SignalR学习系列】4. SignalR广播程序

    创建项目 创建一个空的 Web 项目,并在 Nuget 里面添加 SignalR,jQuery UI 包,添加以后项目里包含了 jQuery,jQuery.UI ,和 SignalR 的脚本. 服务端 ...

  10. 【jquery】获取元素高度

    1. $("#div_id").height(); // 获得的是该div本身的高度, (不包含padding,margin,border)2. $("#div_id&q ...