[踩坑填坑] 阿里云CentOS 8.x Error: Failed to download metadata for repo 'AppStream': ...

[复制链接]
作者
n2n1   发布于2022-2-12 13:48:59 来自河北
阿里云CentOS 8.x Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Errors during downloading metadata for repository 'AppStream':
  - Status code: 404 for http://mirrors.cloud.aliyuncs.co ... repodata/repomd.xml (IP: 100.100.2.148)
Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried



[root@iZpgmznw4x2di0Z ~]# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
+ sh -c 'yum install -y -q yum-utils'
Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@iZpgmznw4x2di0Z ~]# yum install openssh openssh-server openssh-clients


安装依赖yum install -y yum-utils

配置镜像仓库yum-config-manager \    --add-repo \    http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

更新yum缓存# # yum makecache fast,带fast参数的话,centos8以上版本会报错。yum makecache

安装containerd.ioyum install https://download.docker.com/linu ... 3.3.fc30.x86_64.rpm

安装docker# 安装Docker,执行如下命令的时候报错,containerd.io有问题。yum install docker-ce docker-ce-cli containerd.io

启动以及测试systemctl start dockerdocker version

配置阿里云加速,如果是阿里云用户,在自己账户中可以找到加速的镜像链接[url=][/url]
sudo mkdir -p /etc/dockersudo tee /etc/docker/daemon.json <<-'EOF'{  "registry-mirrors": ["https://s9j9zpi7.mirror.aliyuncs.com"]}EOFsudo systemctl daemon-reloadsudo systemctl restart docker[url=][/url]

安装 Docker-Compose (不是必要)[url=][/url]
# Docker-Compose项目是Docker官方的开源项目,负责实现对Docker容器集群的快速编排。# Centos8提供了pip3,没有pip,想自己安装的话,也会找不到合适的版本。pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --upgrade pippip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com docker-compose[url=][/url]







回复

使用道具 举报

您需要登录后才可以回帖 登录 | 创建账号

本版积分规则

Archiver|小黑屋|( 冀ICP备2021005463号 )

GMT+8, 2024-4-19 18:42 , Processed in 0.101986 second(s), 24 queries , Gzip On.

N2N1 It社区 n2n1.cn

Copyright © 2001-2021,MeiCheng.

快速回复 返回顶部 返回列表