欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 财经 > 产业 > linux下yum安装时出现Loaded plugins: fastestmirror的解决办法

linux下yum安装时出现Loaded plugins: fastestmirror的解决办法

2024/10/25 13:21:22 来源:https://blog.csdn.net/qq_56698744/article/details/142700017  浏览:    关键词:linux下yum安装时出现Loaded plugins: fastestmirror的解决办法

一、centos7修改源

在CentOS 7中,修改系统软件源可以通过编辑/etc/yum.repos.d/目录下的.repo文件来实现。以下是一个基本的步骤和示例代码,用于将默认的软件源修改为阿里云的源。
备份当前的CentOS-Base.repo文件:

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载阿里云的CentOS源配置文件:

sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清除缓存并生成新的缓存:

sudo yum clean all
sudo yum makecache

以上步骤将会将系统的软件源修改为阿里云的源,并更新缓存。你可以根据需要将上述的阿里云源地址换成其他的源地址。

二、常用Linux的国内源

Centos
中国软件科学院研究所
https://mirror.iscas.ac.cn/centos/
校园联合镜像源
https://help.mirrors.cernet.edu.cn/centos/
清华大学源
https://mirrors.tuna.tsinghua.edu.cn/help/centos/
中科大源
https://mirrors.ustc.edu.cn/help/centos.html
上海交通大学源
https://mirrors.sjtug.sjtu.edu.cn/docs/centos
北京交通大学源
https://mirror.bjtu.edu.cn/help/centos/
阿里源
https://developer.aliyun.com/mirror/centos
epel源(Centos企业源)
中国软件科学院研究所
https://mirror.iscas.ac.cn/epel/
校园联合镜像源
https://help.mirrors.cernet.edu.cn/epel/
清华大学源
https://mirrors.tuna.tsinghua.edu.cn/help/epel/
中科大源
https://mirrors.ustc.edu.cn/help/epel.html
阿里源
https://developer.aliyun.com/mirror/epel
Ubuntu
中国软件科学院研究所
https://mirror.iscas.ac.cn/ubuntu/
校园联合镜像源
https://help.mirrors.cernet.edu.cn/ubuntu/
清华大学源
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
中科大源
https://mirrors.ustc.edu.cn/help/ubuntu.html
阿里源
https://developer.aliyun.com/mirror/ubuntu
上海交通大学源
https://mirrors.sjtug.sjtu.edu.cn/docs/ubuntu
北京交通大学源
https://mirror.bjtu.edu.cn/help/ubuntu/
Debian
中国软件科学院研究所
https://mirror.iscas.ac.cn/debian/
校园联合镜像源
https://help.mirrors.cernet.edu.cn/debian/
清华大学源
https://mirrors.tuna.tsinghua.edu.cn/help/debian/
中科大源
https://mirrors.ustc.edu.cn/help/debiancn.html
阿里源
https://developer.aliyun.com/mirror/debian
上海交通大学源
https://mirrors.sjtug.sjtu.edu.cn/docs/debian
Proxmox(PVE)
中国软件科学院研究所
https://mirror.iscas.ac.cn/proxmox/
校园联合镜像源
https://help.mirrors.cernet.edu.cn/proxmox/
清华大学源
https://mirrors.tuna.tsinghua.edu.cn/help/proxmox/
中科大源
https://mirrors.ustc.edu.cn/help/proxmox.html
Ceph
中国软件科学院研究所
https://mirror.iscas.ac.cn/ceph/
校园联合镜像源
https://help.mirrors.cernet.edu.cn/ceph/
清华大学源
https://mirrors.tuna.tsinghua.edu.cn/ceph/
中科大源
https://mirrors.ustc.edu.cn/ceph/
                 
原文链接:https://blog.csdn.net/weixin_51792671/article/details/125044470

三、使用 yum 出现 Loaded plugins: fastestmirror

配置好镜像源后,如果还是无法使用且报错为

Loaded plugins: fastestmirror

解决方法:

1.修改fastestmirror配置文件

vim /etc/yum/pluginconf.d/fastestmirror.conf 

复制

将 enable=1 改为 enable=0

2.修改yum配置文件

 vim /etc/yum.conf

将plugins改为0

3.清除缓存并重新构建yum源

依次执行

yum clean all

yum clean dbcache

yum makecache

 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com