CentOS 8 不能使用 yum 问题

问题

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)
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容