亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

CentOS8使用阿里云yum源異常問(wèn)題及解決方法

  發(fā)布時(shí)間:2022-04-19 15:04:57   作者:百羽   我要評(píng)論
由于centos8 在2022年停止服務(wù),后繼版本為8-steam。在使用阿里云的 centos8 的 yum 時(shí)報(bào)錯(cuò),這篇文章主要介紹了CentOS8使用阿里云yum源異常的解決方法,需要的朋友可以參考下

鏡像下載、域名解析、時(shí)間同步請(qǐng)點(diǎn)擊 阿里云開(kāi)源鏡像站

Linux安裝git時(shí)發(fā)生如下錯(cuò)誤

[root@raoyuuuu maven]# dnf install git

Repository extras is listed more than once in the configuration

Repository epel is listed more than once in the configuration

CentOS-8 - Base - mirrors.aliyun.com                                                                                                                                                                                                         

Errors during downloading metadata for repository 'base':

  - Curl error (28): Timeout was reached for http://mirrors.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds]

  - Status code: 404 for https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 106.15.218.235)

  - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148)

Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

使用yum makecache命令也是一樣的問(wèn)題

原因:

由于centos8 在2022年停止服務(wù),后繼版本為8-steam。在使用阿里云的 centos8 的 yum 時(shí)報(bào)錯(cuò)。

根據(jù)上面說(shuō)法只要將版本號(hào)替換即可
可以拿報(bào)錯(cuò)信息里的地址測(cè)試一下

將8替換成8-stream

說(shuō)明確實(shí)是版本的問(wèn)題,因?yàn)榍皟善獪y(cè)試后太過(guò)繁瑣,直接按第三篇的方法

解決方案

1、進(jìn)入配置文件內(nèi),刪除所有的.repo文件(也可以備份)

#進(jìn)入配置文件夾
cd /etc/yum.repos.d/
#刪除舊的配置文件
rm *.repo
#輸入“y”回車(chē)確認(rèn)

ls確保該目錄下的.repo文件已完全刪除
下載可以用的.repo文件

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

如果你沒(méi)有安裝wget,也可以用下面命令:

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo

運(yùn)行 yum makecache 生成緩存

yum makecache

完成

安裝git也成功

到此這篇關(guān)于CentOS8使用阿里云yum源異常的文章就介紹到這了,更多相關(guān)CentOS8 阿里云yum源異常內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論