当前位置:首页 > 网站制作 > 正文内容

完美解决CentOS8 yum安装AppStream报错,更新yum后无法makecache的问题

admin4年前 (2022-08-15)网站制作917

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'

  

更换国内yum源

# 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缓存

# yum clean all

  

建立新的缓存

# yum makecache

  

解决makecahe报错

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'

  

解决办法

  • 将CentOS-AppStream.repo文件中的链接更新

# 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

# yum makecache


扫描二维码推送至手机访问。

版权声明:本文由博赚恋吧资源站发布,如需转载请注明出处。

本文链接:https://432l.com/post/9746.html

分享给朋友:

相关文章

博客如何赚钱

                   博客在中国已经得到了快速的发展。如今博客可以赚钱这句话已经不是什么新说法了,很多博客作者也已经从中尝到了很多甜头(来这看前博客的收入)。各种各样的盈利工具也都随着出现了。在这里就简单...

WebApp网站列表:适合于网站/Blog的在线聊天服务

这里总结的在线聊天服务是一类适合于网站/Blog方便读者直接在线交流,或者直接通过IM等工具和在线读者交流的服务。1.Geesee属于一个在线聊天室,提供blog或网站嵌入功能,也提供外链的聊天室,界面很漂亮,支持中文。简单注册之后就可以开始建立自己的聊天室。你可以定制你的聊天室(内嵌如网页的尺寸),操作步骤很简单。详细介绍。2.Hab.la:加入一段简单的Javascript代码,可以使你和访问...

恋吧推荐的20个最好的免费音乐分享网站

20个最好的免费音乐分享网站 FinetuneGrooveshark Imeem Jango JukeFly Last.fm Musicoveryhttp://musicovery.com/可以设置你的心情和音乐类型,然后可以播放相应的音乐。详细介绍。MySpace Pandora SkreemR 以上部分来源:CnM...

恋吧偶见URLfan—通过RSS Feeds 进行网站排名跟踪

URLfan是一个网站排名跟踪工具(URL tracking tool ),以url地址在他们所索引的 RSS feeds中的出现次数为主要依据。你也可以键入你的URL 看在URLfan's的数据库中是什么结果。URLfan 当前跟踪285,000多个feeds。网站url经常出现在在博客世界(blogosphere)一定程度上反映了该网站的流行度,而他们对这项反映实时跟踪的计划正在进展之中...

恋吧推荐—Twitter账号也能交易?没听说过吧?

域名出售早已数见不鲜,但您想到过Twitter的账号也已经珍贵到可以交易了么。随着越来越多的商家开始使用Twitter进行宣传,嗅觉灵敏的人也发现了其中的商机。Tweexchange就提供了这样一个进行Twitter交易的平台,您可以寻找或提交自己中意的Twitter账号,出价或定价来进行交易。翻看了一下,我见到的标价最高的账号是cnnvideo,居然喊到500,000$,难道是因为拥有者看到cn...

fuck you !blogbus,你算哪根葱?

fuck blogbus,你算哪根葱? 都说blogbus好,于是自己就去注册了个。因为可以直接添加JS代码,感觉挂挂广告的,赚点零花钱什么的,不用花购买空间费。很好!可是....... 从09年6月5号起,当我打开自己的blogbus站点。http://52lj.blogbus.com 和 http://blogrolls.blogbus.com,发现一打开,说:找不到。心想可能是正常...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。