hexo/source/_posts/centos在yum时出现Determining-fa...

49 lines
1.4 KiB
Markdown
Raw Normal View History

2023-10-05 09:01:42 +08:00
---
title: centos在yum时出现Determining fastest mirrors
2023-10-06 11:11:02 +08:00
tags: centos
2023-10-05 09:01:42 +08:00
categories: 分享
2023-10-06 15:41:51 +08:00
abbrlink: eb6a87ce
date: 2023-10-05 08:42:55
2023-10-05 09:01:42 +08:00
cover:
---
## 问题1
在`yum makecache`时,停在`Determining fastest mirrors`一直在判断最快镜像由于已经指定了yum源所以不需要些插件可以用动禁用。
解决方法:
修改`/etc/yum/pluginconf.d/fastestmirror.conf`里面的`enabled=0`
修改`/etc/yum.conf`里面的`plugins=0`
问题解决。
## 问题2
Could not retrieve mirrorlist http://mirrors.elrepo.org/mirrors-elrepo.el7 error was
12: Timeout on http://mirrors.elrepo.org/mirrors-elrepo.el7: (28, 'Connection timed out after 30001 milliseconds')
镜像列表http://mirrors.elrepo.org/mirrors-elrepo.el7 的地址无法访问
解决方法
更新ELRepo 软件仓库镜像
首先按照官网的安装说明,配置 ELRepo
```
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
```
按照你的系统版本,运行:
```
yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
```
接下来是换源,建议先备份 `/etc/yum.repos.d/elrepo.repo`
```
cp /etc/yum.repos.d/elrepo.repo /etc/yum.repos.d/elrepo.repo.bak
```
然后编辑` /etc/yum.repos.d/elrepo.repo` 文件,在 `mirrorlist= `后的地址替换为
```
https://mirrors.tuna.tsinghua.edu.cn/elrepo
```
最后,更新软件包缓存
```
yum makecache
```