标签:Errors CentOS repository -- repo rw 报错 yum root
yum源故障
[root@iZ2ze1e3u7m7oe426pyndaa ~]# yum install net-tools -y CentOS-8 - AppStream 7.9 kB/s | 2.3 kB 00:00 Errors during downloading metadata for repository 'AppStream': - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148) Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
原来是阿里的镜像站有变化:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.73db1b11siwlNO
[root@iZ2ze1e3u7m7oe426pyndaa ~]# cd /etc/yum.repos.d/ [root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# ll total 48 -rw-r--r-- 1 root root 635 Nov 20 2020 CentOS-AppStream.repo -rw-r--r-- 1 root root 619 Nov 20 2020 CentOS-Base.repo -rw-r--r-- 1 root root 701 Nov 20 2020 CentOS-centosplus.repo -rw-r--r-- 1 root root 1329 Nov 20 2020 CentOS-CR.repo -rw-r--r-- 1 root root 668 Nov 20 2020 CentOS-Debuginfo.repo -rw-r--r-- 1 root root 227 Nov 20 2020 CentOS-epel.repo -rw-r--r-- 1 root root 663 Nov 20 2020 CentOS-Extras.repo -rw-r--r-- 1 root root 242 Nov 20 2020 CentOS-fasttrack.repo -rw-r--r-- 1 root root 928 Nov 20 2020 CentOS-Media.repo -rw-r--r-- 1 root root 639 Nov 20 2020 CentOS-PowerTools.repo -rw-r--r-- 1 root root 1382 Nov 20 2020 CentOS-Sources.repo -rw-r--r-- 1 root root 74 Nov 20 2020 CentOS-Vault.repo [[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# mkdir /home/ydt/yum.repos.d.ori [root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# cp * /home/ydt/yum.repos.d.ori/ [root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# ll /home/ydt/yum.repos.d.ori/ total 48 -rw-r--r-- 1 root root 635 Feb 15 14:03 CentOS-AppStream.repo -rw-r--r-- 1 root root 619 Feb 15 14:03 CentOS-Base.repo -rw-r--r-- 1 root root 701 Feb 15 14:03 CentOS-centosplus.repo -rw-r--r-- 1 root root 1329 Feb 15 14:03 CentOS-CR.repo -rw-r--r-- 1 root root 668 Feb 15 14:03 CentOS-Debuginfo.repo -rw-r--r-- 1 root root 227 Feb 15 14:03 CentOS-epel.repo -rw-r--r-- 1 root root 663 Feb 15 14:03 CentOS-Extras.repo -rw-r--r-- 1 root root 242 Feb 15 14:03 CentOS-fasttrack.repo -rw-r--r-- 1 root root 928 Feb 15 14:03 CentOS-Media.repo -rw-r--r-- 1 root root 639 Feb 15 14:03 CentOS-PowerTools.repo -rw-r--r-- 1 root root 1382 Feb 15 14:03 CentOS-Sources.repo -rw-r--r-- 1 root root 74 Feb 15 14:03 CentOS-Vault.repo
清空yum源配置文件
[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# rm -rf *
下载新的阿里云镜像源
[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo --2022-02-15 14:04:11-- https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 39.96.118.189, 39.96.118.196, 39.96.118.148, ... Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|39.96.118.189|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2495 (2.4K) [application/octet-stream] Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’ /etc/yum.repos.d/CentOS-Base.repo 100%[================================================================================================================>] 2.44K --.-KB/s in 0s 2022-02-15 14:04:11 (63.2 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2495/2495]
生成缓存
[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# yum makecache CentOS-8.5.2111 - Base - mirrors.aliyun.com 25 MB/s | 4.6 MB 00:00 CentOS-8.5.2111 - Extras - mirrors.aliyun.com 296 kB/s | 10 kB 00:00 CentOS-8.5.2111 - AppStream - mirrors.aliyun.com 46 MB/s | 8.4 MB 00:00 Metadata cache created. [root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# ll total 4 -rw-r--r-- 1 root root 2495 Feb 14 21:16 CentOS-Base.repo
[root@iZ2ze1e3u7m7oe426pyndaa ~]# yum install net-tools -y CentOS-8 - AppStream 7.9 kB/s | 2.3 kB 00:00 Errors during downloading metadata for repository 'AppStream': - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148) Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
今天发现阿里云服务器上的yum源不能用了。
[root@iZ2ze1e3u7m7oe426pyndaa ~]# yum install net-tools -yCentOS-8 - AppStream 7.9 kB/s | 2.3 kB 00:00 Errors during downloading metadata for repository 'AppStream': - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148)Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried1.2.3.4.5.解决思路 必应了一番之后,找到一篇文章:https://blog.csdn.net/tongkongyu/article/details/122824763
原来是阿里的镜像站有变化:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.73db1b11siwlNO
解决思路就是删除之前的repo文件,下载新的repo文件。
备份[root@iZ2ze1e3u7m7oe426pyndaa ~]# cd /etc/yum.repos.d/[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# lltotal 48-rw-r--r-- 1 root root 635 Nov 20 2020 CentOS-AppStream.repo-rw-r--r-- 1 root root 619 Nov 20 2020 CentOS-Base.repo-rw-r--r-- 1 root root 701 Nov 20 2020 CentOS-centosplus.repo-rw-r--r-- 1 root root 1329 Nov 20 2020 CentOS-CR.repo-rw-r--r-- 1 root root 668 Nov 20 2020 CentOS-Debuginfo.repo-rw-r--r-- 1 root root 227 Nov 20 2020 CentOS-epel.repo-rw-r--r-- 1 root root 663 Nov 20 2020 CentOS-Extras.repo-rw-r--r-- 1 root root 242 Nov 20 2020 CentOS-fasttrack.repo-rw-r--r-- 1 root root 928 Nov 20 2020 CentOS-Media.repo-rw-r--r-- 1 root root 639 Nov 20 2020 CentOS-PowerTools.repo-rw-r--r-- 1 root root 1382 Nov 20 2020 CentOS-Sources.repo-rw-r--r-- 1 root root 74 Nov 20 2020 CentOS-Vault.repo[[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# mkdir /home/ydt/yum.repos.d.ori[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# cp * /home/ydt/yum.repos.d.ori/[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# ll /home/ydt/yum.repos.d.ori/total 48-rw-r--r-- 1 root root 635 Feb 15 14:03 CentOS-AppStream.repo-rw-r--r-- 1 root root 619 Feb 15 14:03 CentOS-Base.repo-rw-r--r-- 1 root root 701 Feb 15 14:03 CentOS-centosplus.repo-rw-r--r-- 1 root root 1329 Feb 15 14:03 CentOS-CR.repo-rw-r--r-- 1 root root 668 Feb 15 14:03 CentOS-Debuginfo.repo-rw-r--r-- 1 root root 227 Feb 15 14:03 CentOS-epel.repo-rw-r--r-- 1 root root 663 Feb 15 14:03 CentOS-Extras.repo-rw-r--r-- 1 root root 242 Feb 15 14:03 CentOS-fasttrack.repo-rw-r--r-- 1 root root 928 Feb 15 14:03 CentOS-Media.repo-rw-r--r-- 1 root root 639 Feb 15 14:03 CentOS-PowerTools.repo-rw-r--r-- 1 root root 1382 Feb 15 14:03 CentOS-Sources.repo-rw-r--r-- 1 root root 74 Feb 15 14:03 CentOS-Vault.repo1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.清空yum源配置文件[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# rm -rf *1.下载新的阿里云镜像源[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo--2022-02-15 14:04:11-- https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repoResolving mirrors.aliyun.com (mirrors.aliyun.com)... 39.96.118.189, 39.96.118.196, 39.96.118.148, ...Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|39.96.118.189|:443... connected.HTTP request sent, awaiting response... 200 OKLength: 2495 (2.4K) [application/octet-stream]Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’
/etc/yum.repos.d/CentOS-Base.repo 100%[================================================================================================================>] 2.44K --.-KB/s in 0s
2022-02-15 14:04:11 (63.2 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2495/2495]1.2.3.4.5.6.7.8.9.10.11.生成缓存[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# yum makecacheCentOS-8.5.2111 - Base - mirrors.aliyun.com 25 MB/s | 4.6 MB 00:00 CentOS-8.5.2111 - Extras - mirrors.aliyun.com 296 kB/s | 10 kB 00:00 CentOS-8.5.2111 - AppStream - mirrors.aliyun.com 46 MB/s | 8.4 MB 00:00 Metadata cache created.[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# lltotal 4-rw-r--r-- 1 root root 2495 Feb 14 21:16 CentOS-Base.repo1.2.3.4.5.6.7.8.验证yum源已正常[root@iZ2ze1e3u7m7oe426pyndaa yum.repos.d]# yum install net-tools -yLast metadata expiration check: 0:01:04 ago on Tue 15 Feb 2022 02:04:49 PM CST.Package net-tools-2.0-0.51.20160912git.el8.x86_64 is already installed.Dependencies resolved.============================================================================================================================================================================================================ Package Architecture Version Repository Size============================================================================================================================================================================================================Upgrading: net-tools x86_64 2.0-0.52.20160912git.el8 base 322 k
Transaction Summary============================================================================================================================================================================================================Upgrade 1 Package
Total download size: 322 kDownloading Packages:net-tools-2.0-0.52.20160912git.el8.x86_64.rpm 13 MB/s | 322 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total 13 MB/s | 322 kB 00:00 Running transaction checkTransaction check succeeded.Running transaction testTransaction test succeeded.Running transaction Preparing : 1/1 Running scriptlet: net-tools-2.0-0.52.20160912git.el8.x86_64 1/1 Upgrading : net-tools-2.0-0.52.20160912git.el8.x86_64 1/2 Running scriptlet: net-tools-2.0-0.52.20160912git.el8.x86_64 1/2 Cleanup : net-tools-2.0-0.51.20160912git.el8.x86_64 2/2 Running scriptlet: net-tools-2.0-0.51.20160912git.el8.x86_64 2/2 Verifying : net-tools-2.0-0.52.20160912git.el8.x86_64 1/2 Verifying : net-tools-2.0-0.51.20160912git.el8.x86_64 2/2
Upgraded: net-tools-2.0-0.52.20160912git.el8.x86_64
Complete!-----------------------------------©著作权归作者所有:来自51CTO博客作者YuriGagarin的原创作品,如需转载,请与作者联系,否则将追究法律责任yum安装报错:Errors during downloading metadata for repository 'AppStream'的处理https://blog.51cto.com/gagarin/5011005
标签:Errors,CentOS,repository,--,repo,rw,报错,yum,root 来源: https://www.cnblogs.com/nr-zhang/p/16669702.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。