[精讚] [會員登入]
1103

[CentOS 8] 無法使用: No URLs in mirrorlist error

Centos8 沒辦法使用yum安裝軟體的解決方法

分享此文連結 //n.sfs.tw/15977

分享連結 [CentOS 8] 無法使用: No URLs in mirrorlist error @新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2022-11-22 13:56:08 最後編修
2022-11-10 11:37:05 By 張○○
 

centos8 中當使用 yum安裝軟體時出現錯誤 No URLs in mirrorlist

#  yum install -y yum-utils
CentOS Linux 8 - AppStream                                                               43  B/s |  38  B     00:00    
錯誤:無法下載「appstream」軟體庫的中介資料:Cannot prepare internal mirrorlist: No URLs in mirrorlist

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

導致沒辦法再安裝軟體。

因為從在2022年1月31日,CentOS團隊終於從官方鏡像中移除CentOS 8的所有包。

CentOS 8已於2021年12月31日壽終正寢,但軟體包仍在官方鏡像上保留了一段時間,現在他們被轉移到https://vault.centos.org。

 

解決方法

如果你仍然需要運行CentOS 8,你可以在/etc/yum.repos.d中更新一下軟體源。使用vault.centos.org代替mirror.centos.org。

使用以下指令修改軟體源

# sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
# sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*

再執行原本的指令即可。

 

 

參考資料

[1] https://blog.csdn.net/xiaocao_debug/article/details/122807870

[2] https://barecare.jp/blog/2022/06/02/189/

 

END

你可能感興趣的文章

[Linux] 安裝rsync (selinux 的設定) 在selinux enforcing 的情況下安裝rsync

[Centos8] 利用nmcli 設定ipv6 位址 Centos7之後修改網路設定變得比較麻煩一點,此篇介紹使用nmcli指令的方法

[Centos7] 安裝 semanage (selinux工具程式) 安裝selinux的工具程式 semanage

SELinux 常用指令和檔案 在Redhat系列中,Centos5以後加入了selinux,他並沒有這麼可怕,不必每次看到Selinux ,就想把他

[Centos7] 安裝phpMyAdmin Centos 7有新的方式可以安裝phpmyadmin,不必再採用過去的tarball安裝法。

[Centos7] HTTPS/SSL憑證的SELINUX設置 把申請來的憑證檔放到指定的位置後,沒辦法啟動,怎麼辦?

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

[MAC] 截取螢幕畫面的方法 截取螢幕畫面的方法,在MAC中叫作螢幕快照,英文是screenshot

HP SAS硬碟leds燈號說明 HP SAS硬碟leds燈號(hp g7/g6系統適用)說明

[Freebsd] 使用 ADSL 撥接上網 Freebsd上要使用 ADSL 撥接上網,該如何設定?

安裝SPHINX支援中文 新版本的 sphinx 和舊版不同,網路上很多範例和教學是不能用的。此文是安裝和設定方法分享

看懂DSUB DVI HDMI USB等各式影音接頭 看懂DSUB DVI HDMI等各式影音接頭