Linux學(xué)習(xí)筆記總結(jié)(一百零四)-Centos8出現(xiàn)Failed to download metadata for repo 'AppStream'問(wèn)題解決
大家都知道Centos8于2021年年底停止了服務(wù),大家再在使用yum源安裝時(shí)候,出現(xiàn)下面錯(cuò)誤“錯(cuò)誤:Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist”
最終原因還是源的問(wèn)題,解決辦法也是解決源的問(wèn)題。
解決辦法如下:
1、進(jìn)入yum的repos目錄
命令:
cd /etc/yum.repos.d/
2、修改所有的CentOS文件內(nèi)容
命令:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
3、更新yum源為阿里鏡像
命令:
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all
yum makecache
4、yum安裝測(cè)試是否可以yum安裝
命令:
yum install wget –y
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-601041.html
問(wèn)題解決。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-601041.html
到了這里,關(guān)于出現(xiàn)Failed to download metadata for repo ‘AppStream‘問(wèn)題解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!