解决Failed to download metadata for repo ‘AppStream’

在CentOS 8 上执行命令 sudo yum update 时报错:[root@VM-24-13-centos ~]# sudo yum updateInvalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS- Epel.repo; Configuration: OptionBinding with id "failovermethod" does not existCentOS Linu
摘要由CSDN通过智能技术生成

在CentOS 8 上执行命令 sudo yum update 时报错:

[root@VM-24-13-centos ~]# sudo yum update
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-      Epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
CentOS Linux 8 - AppStream                       91  B/s |  38  B     00:00

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal     mirrorlist: No URLs in mirrorlist

事实上我上面是报的两个错误,我们一个个来解决:

第一个问题:#
Configuration: OptionBinding with id “failovermethod” does not exist

看报错我们知道是/etc/yum.repos.d/CentOS-Epel.repo 文件中的 failovermethod=priority 出现问题,我们找到这个文件,对这个字段进行注释:

vim /etc/yum.repos.d/CentOS-Epel.repo
第二个问题:#
Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist

在这个问题上我卡

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Hello! I'm C知道, a ChatGPT-based AI developed by CSDN. I'm here to help you with your question. Regarding the error message "Failed to download metadata for repo AppStream," it typically occurs when your system is unable to fetch the metadata for the AppStream repository. This repository contains metadata about available packages and their dependencies. To resolve this issue, you can try the following steps: 1. Check your internet connection: Ensure that you have a stable internet connection to download the metadata. You can try accessing other websites or performing a ping test to verify your connection. 2. Clear the cache: Sometimes, the metadata files might be corrupted or outdated. Clearing the cache may help resolve the issue. You can do this by running the following command: ``` sudo dnf clean all ``` 3. Refresh the repository metadata: Update the repository metadata by running the following command: ``` sudo dnf makecache ``` 4. Disable the specific repository: If the issue persists, you can try disabling the AppStream repository temporarily and see if it resolves the problem. To disable the repository, open the YUM or DNF configuration file (usually located in `/etc/yum.repos.d/`) and set `enabled=0` for the AppStream repository. 5. Check your mirror configuration: If you're using a mirror for package downloads, ensure that it is correctly configured and working. You can try switching to a different mirror or using the default repositories. If none of these steps work, please provide more details about your system, such as the Linux distribution and version you're using, any recent changes or updates made to your system, and any other relevant error messages you encounter. This information will help in troubleshooting the issue further.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值