yum命令无法使用问题的解决
- 经验分享
- 时间:2021-03-14 09:21
- 4569人已阅读
简介
原因分析:yum在安装时,需要进行配置yum源解决方案:centos-6更换yum源:只需要在centos命令行界面下执行一下几条命令sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.confmv /etc/yum.repos.d/CentOS-Bas
🔔🔔🔔好消息!好消息!🔔🔔🔔
有需要的朋友👉:联系凯哥
原因分析:
yum在安装时,需要进行配置yum源
解决方案:
centos-6 更换 yum 源:
只需要在centos命令行界面下执行一下几条命令
sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo yum clean all yum makecache
2.
centos-7 更换 yum 源:
#在国内使用默认 yum 源下载软件速度慢,更换国内的 yum 源可以提高软件下载速度 # https://www.cnblogs.com/reasonzzy/p/11143737.html # 先执行 [root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo [root@localhost ~]# yum -y install yum-utils # 更新 yum 源 [root@localhost yum.repos.d]# yum clean all [root@localhost yum.repos.d]# yum makecache
下一篇: 【转摘】雪花算法的原理和实现Java