centos 8.5 安装宝塔 一些错误问题 Errors during downloading metadata for repository ‘appstream‘:

Errors during downloading metadata for repository 'appstream':
  - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/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



CentOS Linux 8 - BaseOS                                                                                                  7.5 kB/s | 2.3 kB     00:00    
Errors during downloading metadata for repository 'baseos':
  - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148)
Error: Failed to download metadata for repo 'baseos': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

解决办法

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
  1. 执行命令
yum clean all
 yum makecache
  1. 此时会出现报错

  2. 分别从生成的CentOS-Base.repo 替换以下文件中的 相对应标签内容
    CentOS-Linux-AppStream.repo
    CentOS-Linux-BaseOS.repo

  3. 重新执行

 yum makecache
  1. 安装宝塔 yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

centos 8.5 安装宝塔 一些错误问题 Errors during downloading metadata for repository ‘appstream‘:_第1张图片

参考 https://www.cnblogs.com/bpzblog/p/13918199.html

二. CentOS Linux release 7.9.2009 (Core) 安装宝塔面板时候 Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

方法一
要从 CentOS 8 迁移到 CentOS Stream 8,请运行以下命令:

dnf --disablerepo ‘*’ --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf distro-sync

方法二
将镜像更改为vault.centos.org

cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS -*
yum update -y

参考 https://cloud.tencent.com/developer/article/1966389

你可能感兴趣的:(linux,linux)