【发布时间】:2019-12-28 12:22:00
【问题描述】:
当我尝试运行时,我尝试运行 yum update 以开始使用 yum 工具
yum update
得到一个错误
在看到一些论坛的建议后,我已经禁用了 ipv6、firewalld 并将 dns 服务器设置为 8.8.8.8 和 8.8.4.4。
yum 更新的输出:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 - "Failed connect to mirrorlist.centos.org:80; Operation now in progress"
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:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. 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 --disablerepo=<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 --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
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 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
Cannot find a valid baseurl for repo: base/7/x86_64
【问题讨论】:
-
听起来像是 DNS 问题。验证
/etc/resolv.conf更改,也许yum clean all? -
其他想法...使用 `host` 确保您可以解析该 URI。你背后有代理? SELinux?其他防火墙。
-
我的 DNS 已配置...我在我的 win 计算机中检查了我的代理设置,但我没有使用它。我有互联网连接,一切看起来都很好,所以我真的不明白我做错了什么......(我正在使用带有 cantos 图像的 virtualbox)