-
如果已确保虚拟机确实可联网,然后发现使用yum等命令报错,如下:
-
sudo yum install xxx
已加载插件:fastestmirror, langpacks
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - “Could not resolve host: mirrorlist.centos.org; 未知的名称或服务”One of the configured repositories failed (未知),
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: -
解决办法参考下面链接:请点击此处
-
笔者之所以冒着水文章的风险(我本人不大喜欢去灌水),直接原封不动引用外链。一是因为我用中文主流搜索引擎搜了半天没找到适合的解决方案,耗费不少时间。该文章我是通过谷歌搜的,前几篇之一就是这个,也许你能体会到我心情,当然也希望能解决到各位的问题(以后有问题还是优先在谷歌搜好了…)。
关于“Could not resolve host: mirrorlist.centos.org; 未知的名称或服务”的解决办法
最新推荐文章于 2025-06-14 11:28:32 发布