本文来自于【阿里云官方镜像站:https://developer.aliyun.com/mirror/?utm_content=g_1000307095 】
转发自【https://blog.csdn.net/weixin_40548480/article/details/122772932】
错误触发条件:
环境: centos8、使用阿里源
操作:yum makecache之后触发下面错误
[root@173-24-138-34 yum.repos.d]# yum makecache
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Base.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Base.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Base.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Base.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Base.repo; Configuration: OptionBinding with id "failovermethod" does not exist
CentOS-8 - Base - mirrors.aliyun.com 84 B/s | 2.3 kB 00:27
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: 111.19.234.242)
- Curl error (7): Couldn't connect to server for http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml [Failed to connect to mirrors.aliyuncs.com port 80: Connection refused]
- Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 132.226.38.239)
Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were trie
警告的解决:将failovermethod=priority注释
url资源找不到的解决:
(1)vim 后在命令模式下执行 %s/mirrors.cloud.aliyuncs.com/mirrors.aliyun.com/g
(2)在上述命令模式下继续执行:%s/$releasever/$releasever-stream/g
相关推荐
© 2020 asciim码
人生就是一场修行