Centos 8 Uses Aliyun to Report 404 Error

CentOS 8 uses Aliyuan to report 404 error Introduction:

CentOS 8 uses Aliyun to report 404 error Problem Description



Repository extras is listed more than once in the configuration

Errors during downloading metadata for repository 'base' :
- Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 39.96.118.195 )
- Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148)
- Curl error (28): Timeout was reached for http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds]
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

wget -O /etc/yum.repos.d /CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo _ _ _ _

The above error occurs when running yum make cache

CentOS 8 uses Aliyun to report 404 error problem analysis



Seeing that the error should be 404 when getting the XML file
Open the browser and enter https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml
found inaccessible
Look up level by level and find that the directory can be accessed at https://mirrors.aliyun.com/centos/8/, but there is no basis in the subdirectory

Go back to the superior again to search in the centos directory and find that only
https://mirrors.aliyun.com/centos/8-stream/ There are yum baseOS repo files in the directory

Down the BaseOS path, I did find repomd.xml
So far, the problem has been found. It should be that Alibaba Cloud has changed the source file structure but there is no synchronous modification in the repo configuration file. You only need to modify the path information in the repo file.

CentOS 8 uses Aliyuan to report 404 error Solution



Sed -i _ 's/$ releasever /8-stream/g' / etc / yum.repos.d / CentOS- Base.repo
Modify the path information in the file to 8-stream, and you can access the source normally

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00