原标题:宝塔安装报错: Error: Failed to download metadata for repo 'epel':
导读:
今天帮客户安装opencart,安装opencart之前,需要配置服务器,宝塔是首选。进入宝塔官网 https://www.bt.cn/new/down...
今天帮客户安装opencart,安装opencart之前,需要配置服务器,宝塔是首选。
进入宝塔官网 https://www.bt.cn/new/download.html
安装宝塔比较简单,以前安装没什么问题,今天安装突然报错了
[root@ecs-30021 /]# yum install -y wget && wget -O install.sh http://download.bt.cn/install/i
nstall_6.0.sh && sh install.sh
Extra Packages for Enterprise Linux 8 - x86_64 178 B/s | 196 B 00:01
Errors during downloading metadata for repository 'epel':
- Status code: 404 for http://archives.fedoraproject.org/pub/archive/epel/8/Everything/x86_64/repodata/repomd.xml (IP: 38.145.60.23)
Error: Failed to download metadata for repo 'epel': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[root@ecs-30021 /]#
查找资料,发现是因为所用系统为Centos 8版本,暂时(此时为2022-03-16)已停止更新相应依赖,于是按照下面操作解决问题
备份源文件夹
mv /etc/yum.repos.d /etc/yum.repos.d.bak
创建源文件目录
mkdir -p /etc/yum.repos.d
下载新的yum源
a) curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo > /etc/yum.repos.d/Centos-vault-8.5.2111.repo
b) curl https://mirrors.aliyun.com/repo/epel-archive-8.repo > /etc/yum.repos.d/epel-archive-8.repo
重建缓存
yum clean all && yum makecache
问题解决,重新按照宝塔步骤安装即可
还没有评论,来说两句吧...