安装软件包时报告错误:

Could not retrieve mirrorlistarch=x 86 _ 64 repo=OS infra=container error was

143360 curl # 6-' could not resolve host : mirror Li;“Unknown error”是:

[root @ one _ partner ~]# yum install wget

loaded plugins : fastest mirror,ovl

Determining fastest mirrors

Could not retrieve mirrorlistarch=x 86 _ 64 repo=OS infra=container error was

143360 curl # 6-' could not resolve host : mirror Li;' Unknown error '

one of the configured repositories failed(unknown),

and yum doesn ' t have enough cached data to continue . at this point the only

safe thing yum can do is fail . there are a few ways to work ' fix ' this 3360

1.contact the upstream for the repository and get them to fix the problem

2.re configure the base URL/etc . for the repository,to point to a working

up stream . this is most often useful if you are using a newer

distribution release than is supported by the repository(and the)

packages for the previous distribution release still work)。

3.run the command with the repository temporarily disabled

Yum-disable repo=repoid.

4.disable the repository permanently,so yum won't use it by default.yum

will then just ignore the repository until you permanently enable it

again or use—enable repo for temporary usage :

yum-config-manager-disable repo id

Or

subscription-manager repos-disable=repoid

5.configure the failing repository to be skipped,if it is unavailable。

note that yum will try to contact the repo . when it runs most commands,

so will have to try and fail each time(and thus . yum will be much)

Slower)。if it is a very temporary problem though,this is often a nice

Compromise:

yum-config-manager-save-setopt=repoid . skip _ if _ unavailable=true

用于Repo : base/7/x86 _ 64的cannot find a valid base URL

因为这种存储不能解析域名。最终,如果在不设置DNS的情况下设置DNS,然后重新启动网络,就可以解决

#编辑网络

vim/etc/sys config/network-scripts/if CFG-ens33

在#底部添加以下两行

DNS1=202.103.24.68

DNS2=202.103.44.150

#重新启动网络

Systemctl restart ne

#但是,不能在虚拟机上重新启动网络。虚拟机需要重新启动。

1.《【cannot find】专题Linux安装包时提示域名无法解析》援引自互联网,旨在传递更多网络信息知识,仅代表作者本人观点,与本网站无关,侵删请联系页脚下方联系方式。

2.《【cannot find】专题Linux安装包时提示域名无法解析》仅供读者参考,本网站未对该内容进行证实,对其原创性、真实性、完整性、及时性不作任何保证。

3.文章转载时请保留本站内容来源地址,https://www.cxvn.com/gl/djyxgl/169662.html