1.Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorl


一.问题:

centos8 yum 报错 yum Failed to download metadata for repo ‘AppStream’ 

二.原因:

cd /etc/yum.repos.d
vim CentOS-Base.repo

base源地址baseurl失效

解决方案:

参考  https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b119E38CQ   来切换源

同时可以添加EPEL (Extra Packages for Enterprise Linux)额外包,里面包含nginx这些常用包

参考  https://developer.aliyun.com/mirror/epel?spm=a2c6h.13651102.0.0.3e221b119E38CQ