2022 centos8.3 配置國內yum源


最近安裝centos8.3 按照百度配置阿里雲出錯如下:

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

 

之后安裝yum配置里地址上去 發現centos8終止支持之后將之前yum源中的文件刪除了 需要去 http://mirrors.aliyun.com/centos-vault/找到對應的yum文件

具體配置如下

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/BaseOS/x86_64/os/
gpgcheck=0

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/extras/x86_64/os/
gpgcheck=0

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/centosplus/x86_64/os/
gpgcheck=0
enabled=1

[PowerTools]
name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/PowerTools/x86_64/os/
gpgcheck=0
enabled=1


[AppStream]
name=CentOS-$releasever - AppStream - mirrors.aliyun.com
#failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/8.3.2011/AppStream/x86_64/os/
gpgcheck=0

之后就可以正常更新軟件、安裝軟件了。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM