linux 用yum安装包报错All mirror URLs are not using ftp, http[s] or file.的解决方案

用root用户登录,执行以下命令:

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
上一篇:2021-04-27


下一篇:linux下安装nginx