mirror of https://github.com/jkjoy/sunpeiwen.git
48 lines
1.4 KiB
Markdown
48 lines
1.4 KiB
Markdown
|
---
|
|||
|
title: centos在yum时出现Determining fastest mirrors
|
|||
|
date: 2023-10-05 08:42:55
|
|||
|
tags: centos,运维
|
|||
|
categories: 分享
|
|||
|
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
|
|||
|
```
|