为仓库 'AppStream' 下载元数据失败
问题描述:
[root@localhost /]# yum -y install centos2anolis AnolisOS-8 - AppStream 0.0 B/s | 0 B 02:00 Errors during downloading metadata for repository 'AppStream': - Curl error (28): Timeout was reached for http://mirrors.cloud.aliyuncs.com/anolis/8/AppStream/x86_64/os/repodata/repomd.xml [Connection timed out after 30001 milliseconds] - Curl error (28): Timeout was reached for http://mirrors.cloud.aliyuncs.com/anolis/8/AppStream/x86_64/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds] 错误:为仓库 'AppStream' 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
问题分析:参照《CentOS 8迁移Anolis OS 8手册》 进行到安装迁移工具centos2anolis时报错的,错误信息来看,问题出在无法从指定的镜像源(mirrors.cloud.aliyuncs.com
)下载元数据。报错的具体原因是 Connection timed out
,意味着请求超时,通常是由于网络连接问题或者该镜像源不可访问。
解决方案:
cp /etc/yum.repos.d/anolis-migration.repo /etc/yum.repos.d/anolis-migration.repo.bak
sudo vi /etc/yum.repos.d/anolis-migration.repo
[migration]
name=Anolis OS - migration repo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/anolis/migration/$releasever/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/anolis/RPM-GPG-KEY-ANOLIS
enabled=1
[migration-debug]
name=Anolis OS - migration debug repo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/anolis/migration/$releasever/$basearch/debug/
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/anolis/RPM-GPG-KEY-ANOLIS
enabled=0
[migration-source]
name=Anolis OS - migration source repo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/anolis/migration/$releasever/source/
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/anolis/RPM-GPG-KEY-ANOLIS
enabled=0
sudo yum clean allsudo yum makecache
sudo yum -y install centos2anolis