"); //-->
Ubuntu使用apt-get下载速度慢的解决方法
查看所用的源:
$ sudo vim /etc/apt/sources.list
由于安装的Ubuntu Server 16.04.1 LTS是英文版的,软件源就默认都是 us.archive.ubuntu.com(英国) 的,所以很慢。
# deb cdrom:[Ubuntu-Server 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted #deb cdrom:[Ubuntu-Server 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the## distribution.deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb http://us.archive.ubuntu.com/ubuntu/ xenial universe# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universedeb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team, and may not be under a free licence. Please satisfy yourself as to## your rights to use the software. Also, please note that software in## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiversedeb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's## 'partner' repository.## This software is not part of Ubuntu, but is offered by Canonical and the## respective vendors as a service to Ubuntu users.# deb http://archive.canonical.com/ubuntu xenial partner# deb-src http://archive.canonical.com/ubuntu xenial partnerdeb http://security.ubuntu.com/ubuntu xenial-security main restricted# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricteddeb http://security.ubuntu.com/ubuntu xenial-security universe# deb-src http://security.ubuntu.com/ubuntu xenial-security universedeb http://security.ubuntu.com/ubuntu xenial-security multiverse# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
为了提高下载速度,将源改为国内的 cn.archive.ubuntu.com ,现在 cn.archive.ubuntu.com 指向阿里云的开源镜像站 mirrors.aliyun.com,下载速度很快。
1. 重命名原来的源作为备份:
$ sudo mv /etc/apt/sources.list sources.list_backup
2. 新建一个sources.list文件
$ sudo vim /etc/apt/sources.list
输入如下内容并保存退出:
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricteddeb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricteddeb http://cn.archive.ubuntu.com/ubuntu/ xenial universedeb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universedeb http://cn.archive.ubuntu.com/ubuntu/ xenial multiversedeb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiversedeb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiversedeb http://security.ubuntu.com/ubuntu xenial-security main restricteddeb http://security.ubuntu.com/ubuntu xenial-security universedeb http://security.ubuntu.com/ubuntu xenial-security multiverse
3. 更新apt软件源:
$ sudo apt-get update
转自https://blog.csdn.net/a787202867/article/details/53084602
专栏文章内容及配图由作者撰写发布,仅供工程师学习之用,如有侵权或者其他违规问题,请联系本站处理。 联系我们
相关推荐
开关二极管
有延时的通用报警电路
三极管
幻灯投影机用4通道超声波发生器电路
股市里面爆红的“CPO”,与“CPC”技术对比与展望
TechInsights 解析:Nvidia Jetson AGX Orin 开发者套件
华中科技大学控制系科技创新基地
无线物联网SoC内部装了什么?
知道或用过mocana SSL进来看看!
凯越08智能车展示
224Gbps高速线缆测试方案
EOS失效分析
《黑龙江科技信息》杂志 欢迎投稿
快恢复二极管
搞电气不懂二次回路编号?这可是基本功!
TechInsights 拆解:Supermicro 服务器 SYS-112C-TN
翔腾NPU芯片 +ROS2 over 全志T527
使用Ptotel99软件设计的WH5307DB电路图和PCB设计文件
高频高速PCB测试
中南民族大学第三届飞思卡尔智能车竞赛预赛(第一名)
《黑龙江科技信息》杂志 欢迎投稿
光导智能车
回被探测距离用超声波接收器电路
是否可用wiggler调试lpc2124
远距离报警光栅电路
知道mocana SSL吗??
三星提供的串口调试软件dnw
安世被“抢”:国产替代选型指南
电路图:声控线路
使用iPhone控制智能车