阿里云centos yum报错 - Status code: 404 for https://mirrors.aliyun.com/centos/centos/8/AppStream/x86_6
https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11ON0Hhn
官网直接一行代码搞定
**错误:
yum install maven
Repository epel is listed more than once in the configuration
CentOS Linux 8 - AppStream 17 MB/s | 18 MB 00:01
CentOS Linux 8 - BaseOS 7.3 kB/s | 2.3 kB 00:00
Errors during downloading metadata for repository ‘baseos’:
- Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 39.96.118.192)
Error: Failed to download metadata for repo ‘baseos’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried**
主要是镜像库丢了
https://mirrors.aliyun.com/centos/
修改报错的文件 在目录/etc/yum.repos.d 下面找
![[root@iZbp1ctvnzhvpeu54qslmtZ yum.repos.d]# pwd/etc/yum.repos.d[root@iZbp1ctvnzhvpeu54qslmtZ yum.repos.d]# lltotal 68-rw-r--r-- 1 root root 721 Feb 9 12:39 CentOS-AppStream.repo-rw-r--r-- 1 root root 614 Feb 9 12:41 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 746 Feb 9 12:41 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 644 Feb 9 12:43 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-rw-r--r-- 1 root root 1485 Sep 5 01:28 epel-modular.repo-rw-r--r-- 1 root root 1564 Sep 5 01:28 epel-playground.repo-rw-r--r-- 1 root root 1422 Sep 5 01:28 epel.repo-rw-r--r-- 1 root root 1584 Sep 5 01:28 epel-testing-modular.repo-rw-r--r-- 1 root root 1521 Sep 5 01:28 epel-testing.repo](https://i-blog.csdnimg.cn/blog_migrate/d6687e1bb841cde2f1c42d13f0047c4b.png)
修改baseurl

要保证阿里云仓库数据

比如这个就没有

然后我把 代表8的这个"
r
e
l
e
a
s
e
v
e
r
"
改
成
了
releasever" 改成了
releasever"改成了releasever-stream

更多推荐


所有评论(0)