Ubuntu更新软件源

在ubuntu中更新软件的方法如下三步:

1 .备份原有的软件源文件

设置源的文件在 /etc/apt/sources.list中,首先先备份该文件 cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.添加合适的源

一般我是添加的网易的源

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

3.刷新源

sudo apt-get update
posted @ 2017-11-20 10:38  豌豆豆  阅读(100)  评论(0编辑  收藏  举报