CSDN博客地址

服务器安装yum命令失败解决方式

1: cd /etc/yum.repos.d/
配置阿里yum源
yum地址: https://opsx.alibaba.com/mirror (进入选择合适的版本)
2: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo (CentOS 7版本)
更新
3: yum update
清空yum缓存的软件包和header
4: yum clean all
把yum源中的包信息进行缓存
5: yum makecache

posted @ 2020-03-24 15:31  Yi_warmth  阅读(600)  评论(0编辑  收藏  举报
CSDN博客地址