今天centos8使用yum安装软件时报错。
- Curl error (28): Timeout was reached for http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml [Connection timed out after 30001 milliseconds] - Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 42.81.213.224)
查看一下:https://mirrors.aliyun.com/centos/8/readme
This directory (and version of CentOS) is deprecated.
由于只是安装tcpdump,目前临时解决方案调整了一下安装源。
# echo "8-stream" > /etc/yum/vars/releasever # yum clean all # yum makecache
如果未使用国内镜像也可以手工更新到 vault.centos.org 镜像地址
# cd /etc/yum.repos.d/ # sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* # sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* # yum update -y
镜像地址更新成功后可以升级到centos stream。
# dnf install centos-release-stream -y --allowerasing # dnf distro-sync -y
更详细可以参考引用链接
2022/03/04 阿里云更新了镜像地址, 后续可能要考虑开发环境调整了。
https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11YXaNlz
参考及引用
https://techglimpse.com/failed-metadata-repo-appstream-centos-8/ https://techglimpse.com/convert-centos8-linux-centosstream/
Pexels 上的 Gordon Bishop 拍摄的图片
Comments are closed.