使用yum安装docker的时候报错:

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try

查阅资料,yum源有问题,按以下方法配置:

1.首先备份:

/etc/yum.repos.d/CentOS-Base.repo

2.下载对应版本repo文件:

点击===》网易源

3.放入/etc/yum.repos.d/文件夹

上传本地文件至服务器看这篇博客:传送门==》scp上传文件到服务器

4.运行以下命令生成缓存

yum  clean all

如下:

Centos7配置yum源

yum make cache

如下:

Centos7配置yum源

至此,就可以使用yum命令了。

 

 

相关文章:

  • 2021-08-19
  • 2021-08-23
  • 2022-01-02
  • 2021-08-05
  • 2021-05-02
  • 2021-05-22
猜你喜欢
  • 2021-10-29
  • 2022-12-23
  • 2021-08-26
  • 2021-11-20
  • 2021-06-13
  • 2021-08-16
相关资源
相似解决方案