解决 Error: Failed to download metadata for repo ‘appstream’ 问题
Error: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: No URLs in mirrorlist
Solution: Migrate to CentOS Stream 8 or an alternative distro
Now that CentOS has shifted to Stream – a rolling-release Linux distribution, midstream between the upstream development in Fedora and the downstream development for RHEL – many users are moving to CentOS alternatives. Others have decided to stick with CentOS by migrating to CentOS Stream 8. Both of these choices will resolve not being able to update CentOS 8.
Error: Failed to download metadata for repo ‘appstream’
If you still manage system’s running CentOS 8 and you attempt to update packages u
To migrate from CentOS 8 to CentOS Stream 8, run the following commands:
1 2 3 4 |
dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos dnf distro-sync dnf update -y reboot |
原因是CentOS改为 stream 发布,不在有版本号, 所以需要切换到新源
最后的更新和重启是建议操作,因为内核也会更新