CentOS 8 不能使用 yum 问题

2020-04-12  本文已影响0人  leechan0x01

问题

CentOS 8 不能使用 yum 问题,保错如下:

[root@56b7e4b7252e /]# yum install wget
Failed to set locale, defaulting to C
CentOS-8 - AppStream                                                                                     0.0  B/s |   0  B     00:20
CentOS-8 - Base                                                                                          0.0  B/s |   0  B     00:20
CentOS-8 - Extras                                                                                        0.0  B/s |   0  B     00:20
Failed to synchronize cache for repo 'AppStream', ignoring this repo.
Failed to synchronize cache for repo 'BaseOS', ignoring this repo.
Failed to synchronize cache for repo 'extras', ignoring this repo.
Dependencies resolved.
Nothing to do.
Complete!

解决方法

  1. 先检查一下网络是否可以访问外网(这点很重要,我在 docker 中使用的,就是因为这原因而导致上面的问题)
  2. 尝试修改以下文件:
    /etc/yum.repos.d/CentOS-AppStream.repo
    /etc/yum.repos.d/CentOS-Base.repo
    /etc/yum.repos.d/CentOS-Extras.repo
    ```
将文件中mirrorlist注释并取消注释baseurl

原文链接:[http://leechan.online/detail/33.html](http://leechan.online/detail/33.html)
上一篇 下一篇

猜你喜欢

热点阅读