如何配置yum源及更新yum源列表

1,配置yum源:

进入yum源配置文件的目录
#cd /etc/apt/

备份sources.list文件
#mv sources.list sources.list.bak

编辑sources.list文件
#vim sources.list(先删除里面的全部内容)
插入以下内容(163yum源):

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

2,配置好yum源后,更新软件包列表:
apt-get update

3,期间会提示是否接受,按“y”,并回车

4,完成Ubuntu配置yum源

上一篇:Ubuntu12.0安装g++过程及其报错


下一篇:2021ubuntu软件源-最全(阿里,腾讯云,京东云,清华,百度,163,山大