centos6无法使用yum的问题解决
346 字
2 分钟
centos6无法使用yum的问题解决
2020年12月2日下架了包括官方所有的CentOS6源(包括国内的镜像站) centos6的下架使得centos6的yum无法直接再下载安装软件。 目前需要更新为下面两个源: #阿里云 http://mirrors.aliyun.com/centos-vault/
#阿里云和官方的任选其一即可 具体操作如下: 第一步修改base源:
vi /etc/yum.repos.d/CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the# remarked out baseurl= line instead.##
[base]name=CentOS-6.10 - Base - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
#released updates[updates]name=CentOS-6.10 - Updates - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful[extras]name=CentOS-6.10 - Extras - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/gpgcheck=1gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6.10 - Plus - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users[contrib]name=CentOS-6.10 - Contrib - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6第二步:
vi /etc/yum.repos.d/CentOS-fasttrack.repoenabled=0第三步:
rm /etc/yum.repos.d/docker-ce.repo(如果没有该文件可以忽略本步骤)第四步:此处需要注意,粘贴的时候是否完整
vi /etc/yum.repos.d/epel.repo[epel]name=Extra Packages for Enterprise Linux 6 - $basearchenabled=1failovermethod=priority#baseurl=http://mirrors.aliyuncs.com/epel-archive/6/$basearchbaseurl=http://mirrors.aliyun.com/epel-archive/6/$basearchgpgcheck=0gpgkey=http://mirrors.aliyuncs.com/epel-archive/RPM-GPG-KEY-EPEL-6到这里就完成了,使用yum clean all && yum makecache更新一下yum缓存, 最后使用yum install httpd测试一下发现熟悉的感觉又回来了。
文章分享
如果这篇文章对你有帮助,欢迎分享给更多人!
centos6无法使用yum的问题解决
https://czxcly.cn/posts/centos6无法使用yum的问题解决/ 相关文章 智能推荐
1
Xftp更改权限问题
技术文章 Xftp更改权限问题
2
Shell脚本bash编码错误问题
技术文章 Shell脚本bash编码错误问题
3
设置SSH通过密钥登录
技术文章 设置SSH通过密钥登录
4
彻底卸载谷歌浏览器残留
其它教程 彻底卸载谷歌浏览器残留
5
VisualStudio安装时共享组件、工具和SDK安装位置不能更改的问题
技术文章 VisualStudio安装时共享组件、工具和SDK安装位置不能更改的问题
随机文章 随机推荐