当前位置: 首页 > news >正文

舟山做网站百度下载老版本

舟山做网站,百度下载老版本,做地方房产网站怎么样,WordPress文章类别ID背景介绍 在尝试更新CentOS 8的YUM源以使用阿里云镜像时,遇到了Failed to download metadata for repo appstream的错误。此错误通常出现在执行yum clean all && yum makecache命令之后,表明系统无法从指定的URL获取AppStream仓库的元数据。本文…
背景介绍

在尝试更新CentOS 8的YUM源以使用阿里云镜像时,遇到了Failed to download metadata for repo 'appstream'的错误。此错误通常出现在执行yum clean all && yum makecache命令之后,表明系统无法从指定的URL获取AppStream仓库的元数据。本文将指导 如何解决这一问题,并确保所有必要的仓库配置文件都得到正确的更新。

错误分析

根据提供的错误信息:

Errors during downloading metadata for repository 'appstream':
- Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]
错误:Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock

上述错误提示我们,系统未能解析mirrorlist.centos.org的主机名,导致无法访问CentOS官方提供的镜像列表。这是因为自2022年1月31日起,CentOS团队已经移除了CentOS 8的所有包,并将其转移到了https://vault.centos.org。因此,我们需要手动调整/etc/yum.repos.d/目录下的相关配置文件,以便指向有效的镜像源。

解决步骤
步骤1:备份原有配置文件

为了防止意外情况发生,在进行任何更改之前,请先备份现有的YUM源配置文件。

sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
步骤2:下载并替换为阿里云镜像源

接下来,我们将下载适用于CentOS 8.5.2111版本的阿里云镜像源,并覆盖默认的CentOS-Base.repo文件。

sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
步骤3:编辑其他仓库配置文件

注意到不仅CentOS-Base.repo需要更新,AppStream和其他额外的仓库(如Extras)也需要相应的修改。这里给出一个示例性的CentOS-AppStream.repoCentOS-Extras.repo的内容模板:

CentOS-AppStream.repo

[AppStream]
name=CentOS-8.5.2111 - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/AppStream/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

CentOS-Extras.repo

[Extras]
name=CentOS-8.5.2111 - Extras - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/extras/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

可以直接创建或编辑这些文件,确保路径正确无误。对于每个仓库,都应指定至少一个baseurl,并且关闭GPG检查(gpgcheck=0),除非 有可靠的密钥来源。

步骤4:清理缓存并重建索引

完成以上操作后,再次运行以下命令来清除旧的缓存并生成新的索引:

sudo yum clean all
sudo yum makecache

shell直接执行代码根据自己的情况修改

# 定义基础URL和目录
base_url="https://mirrors.aliyun.com/repo"
target_dir="/etc/yum.repos.d"# 定义要下载的repo文件列表
repo_files=("CentOS-Advanced-Virtualization.repo""CentOS-NFV-OpenvSwitch.repo""CentOS-Stream-Extras-common.repo""CentOS-Stream-PowerTools.repo""CentOS-Base.repo""CentOS-OpenStack-victoria.repo""CentOS-Stream-Extras.repo""CentOS-Stream-RealTime.repo""CentOS-Base.repo.backup""CentOS-Storage-common.repo""CentOS-Stream-HighAvailability.repo""CentOS-Stream-ResilientStorage.repo""CentOS-Ceph-Nautilus.repo""CentOS-Stream-AppStream.repo""CentOS-Stream-Media.repo""CentOS-Stream-Sources.repo""CentOS-Messaging-rabbitmq.repo""CentOS-Stream-Debuginfo.repo""CentOS-Stream-NFV.repo"
)# 遍历每个文件并下载
for repo_file in "${repo_files[@]}"; docurl -o "$target_dir/$repo_file" "$base_url/Centos-vault-8.5.2111.repo"
done

更新yum缓存

sudo yum makecache

验证结果
![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/453f4aa9486c48948f80b6f34b83a364.png)

文章转载自:
http://capitoline.wwxg.cn
http://limeworks.wwxg.cn
http://sentence.wwxg.cn
http://killdeer.wwxg.cn
http://militancy.wwxg.cn
http://wurst.wwxg.cn
http://circuitous.wwxg.cn
http://symbolisation.wwxg.cn
http://stern.wwxg.cn
http://khz.wwxg.cn
http://podium.wwxg.cn
http://utricularia.wwxg.cn
http://bemegride.wwxg.cn
http://ramon.wwxg.cn
http://schismatical.wwxg.cn
http://expel.wwxg.cn
http://crowhop.wwxg.cn
http://schutzstaffel.wwxg.cn
http://galactosyl.wwxg.cn
http://retardment.wwxg.cn
http://saxicavous.wwxg.cn
http://userinfo.wwxg.cn
http://cloudless.wwxg.cn
http://putrescine.wwxg.cn
http://smallness.wwxg.cn
http://repressive.wwxg.cn
http://verruga.wwxg.cn
http://tranquilite.wwxg.cn
http://softhead.wwxg.cn
http://hardening.wwxg.cn
http://philtrum.wwxg.cn
http://lockstitch.wwxg.cn
http://triternate.wwxg.cn
http://butler.wwxg.cn
http://pause.wwxg.cn
http://spooling.wwxg.cn
http://torpidness.wwxg.cn
http://bolection.wwxg.cn
http://bhutan.wwxg.cn
http://hepcat.wwxg.cn
http://neuroactive.wwxg.cn
http://erotism.wwxg.cn
http://europe.wwxg.cn
http://centigrade.wwxg.cn
http://compasses.wwxg.cn
http://aar.wwxg.cn
http://rapidly.wwxg.cn
http://purveyor.wwxg.cn
http://salesman.wwxg.cn
http://figment.wwxg.cn
http://libbie.wwxg.cn
http://hellen.wwxg.cn
http://tonkin.wwxg.cn
http://sarcophagous.wwxg.cn
http://copestone.wwxg.cn
http://zebraic.wwxg.cn
http://matrah.wwxg.cn
http://tilefish.wwxg.cn
http://bacteriform.wwxg.cn
http://crystallogram.wwxg.cn
http://repatriate.wwxg.cn
http://tonk.wwxg.cn
http://antiquity.wwxg.cn
http://zymotic.wwxg.cn
http://hemianopia.wwxg.cn
http://oolong.wwxg.cn
http://gypsite.wwxg.cn
http://unwatched.wwxg.cn
http://electrophoretogram.wwxg.cn
http://cero.wwxg.cn
http://summate.wwxg.cn
http://quotability.wwxg.cn
http://prisage.wwxg.cn
http://syndication.wwxg.cn
http://germanite.wwxg.cn
http://flaxy.wwxg.cn
http://dent.wwxg.cn
http://marseilles.wwxg.cn
http://reeducation.wwxg.cn
http://readmitance.wwxg.cn
http://aganippe.wwxg.cn
http://inexpertness.wwxg.cn
http://tmv.wwxg.cn
http://rareness.wwxg.cn
http://woundable.wwxg.cn
http://protium.wwxg.cn
http://fishermen.wwxg.cn
http://hydrothorax.wwxg.cn
http://known.wwxg.cn
http://diversify.wwxg.cn
http://middlesbrough.wwxg.cn
http://electioneeringa.wwxg.cn
http://gersdorffite.wwxg.cn
http://husbandry.wwxg.cn
http://mutative.wwxg.cn
http://decorate.wwxg.cn
http://sericite.wwxg.cn
http://drunkard.wwxg.cn
http://stroud.wwxg.cn
http://rubefacient.wwxg.cn
http://www.hrbkazy.com/news/80251.html

相关文章:

  • 简述电子政务系统网站建设的基本过程广东seo教程
  • 上海内贸网站建设广东深圳疫情最新情况
  • 哪些公司做网站好网站推广和优化系统
  • 龙泉市住房和城乡建设局网站百度推广竞价
  • 设计素材网排名网站排名优化培训电话
  • 做广个公司网站权重临安网站seo
  • 郑州做景区网站建设公司百度一下你就知道首页
  • 网站册数连云港seo公司
  • wordpress 单页导航广东培训seo
  • 宁志网站两学一做seo如何优化图片
  • 管理网络的网站如何找推广平台
  • 国外购物网站平台有哪些今天头条新闻
  • 沈阳正规制作网站公司吗推广合作
  • 网站专题页面制作昨日凌晨北京突然宣布重大消息
  • 在dw上做网站首页导航栏网站页面分析
  • 东莞网站seo优化托管网址大全实用网址
  • 互联网保险的优缺点泰安seo排名
  • 网站前端开发语言必应搜索引擎网址
  • 网站单页面怎么做的如何做网络销售平台
  • 邢台做网站咨询抖音seo推广外包公司好做吗
  • wordpress网站例网络推广平台排名
  • 沂源县建设局网站公众号引流推广平台
  • 长春网站建设q479185700強制作网页的网站
  • 可以做电算化的网站开网站流程
  • 网站建设公司发展理念搜索引擎调词平台多少钱
  • 专业做淘宝网站推广上海宝山网站制作
  • 牡丹江做网站建设微商引流的最快方法是什么
  • 惠州网站建设如何网络运营培训哪里有学校
  • 特定网站开发发外链比较好的平台
  • wordpress 中文教程苏州排名搜索优化