yum无法使用报错,请问如何解决呢

求助各位大佬,使用yum下载的时候报错了,这个如何解决呀,
版本openEuler 22.03 LTS SP2
报错如图

报错代码

[root@openEuler openGauss]# yum -y install tar
OS                                                          0.0  B/s |   0  B     00:00    
OS                                                          0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'OS':
  - Curl error (6): Couldn't resolve host name for https://mirrors.openeuler.org/metalink?repo=22.03LTS_SP2/OS&arch=x86_64 [Could not resolve host: mirrors.openeuler.org]
  - Curl error (6): Couldn't resolve host name for http://repo.openeuler.org/openEuler-22.03-LTS-SP2/OS/x86_64/repodata/repomd.xml [Could not resolve host: repo.openeuler.org]
Error: Failed to download metadata for repo 'OS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

2 个赞

换个repo源,建议使用华为云的源,你参考【汇总贴】openEuler常用repo源

排查思路:
1、查一下网络联通 ping 8.8.8.8
2、检查dns或/etc/hosts
3、检查软件仓库配置 /etc/yum.repos.d/