linux改变apt-get安装源
最近自己装了个ubuntu kylin 在使用的过程中发现,系统的apt-get 的源有毛病,总是安装不了软件。
感觉应该是传说中的墙的原因,所以准备换到阿里云的源。
下面是步骤:
1、复制原文件备份
sudo cp /etc/apt/source.list /etc/apt/source.list.bak
2、编辑源列表文件
sudo vim /etc/apt/source.list
3、将原来的列表删除,添加如下内容
deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
4、运行sudo apt-get update
5、运行sudo apt-get upgrade
以上就完成了对源的更换。
相关推荐
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common