脚本宝典收集整理的这篇文章主要介绍了【转载】完美解决CentOS8 yum安装AppStream报错,更新yum后无法makecache的问题,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
CentOS 8 yum安装软件时,提示无法从AppStream下载
[root@C8-3 ~]# yum -y install httpd mariadb-server mariadb php php-MySQL ReposITory AppStream is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository PowerTools is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Repository fasttrack is listed more than once in the configuration CentOS-8 - AppStream 0.0 B/s | 0 B 00:08 Failed to download metadata for repo 'AppStream' Error: Failed to download metadata for repo 'AppStream'
# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.3 # wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
# yum clean all
# yum makecache
centos8会出现以下报错
CentOS-8 - AppStream 0.0 B/s | 0 B 00:04 Failed to download metadata for repo 'AppStream' Error: Failed to download metadata for repo 'AppStream'
解决办法
# vim /etc/yum.repos.d/CentOS-AppStream.repo
#这一段注释掉#[AppStream] #name=CentOS-$releasever - AppStream #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&Arch=$basearch&repo=AppStream&infra=$infra #baseurl=http://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/ #mirrorlist=http://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/ #gpgcheck=1 #enabled=1 #pgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial #改为下面这段 [AppStream] name=Qcloud centos AppStream - $basearch baseurl=http://mirrors.cloud.tencent.com/centos/$releasever/AppStream/$basearch/os/ enabled=0 gpgcheck=1 gpgkey=http://mirrors.cloud.tencent.com/centos/RPM-GPG-KEY-CentOS-Official
# yum makecache
以上是脚本宝典为你收集整理的【转载】完美解决CentOS8 yum安装AppStream报错,更新yum后无法makecache的问题全部内容,希望文章能够帮你解决【转载】完美解决CentOS8 yum安装AppStream报错,更新yum后无法makecache的问题所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。