[精讚] [會員登入]
2704

[CENTOS8] Failed to download metadata for repo 'appstream' 的問題

Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist的解決方法。

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

分享連結 [CENTOS8] Failed to download metadata for repo 'appstream' 的問題@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
最後編修
2022-05-03 10:01:17 By 張○○
 

自動目錄

在使用yum或dnf時,出現下面的錯誤

# yum install somepackage
CentOS Linux 8 - AppStream                                                              61  B/s |  38  B     00:00    
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

主要是mirrorlist中的連結無效,把他註解即可

# cd /etc/yum.repos.d/
# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

再把baseurl 註解打開

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

 

這樣就可以了

參考資料

[1] https://techglimpse.com/failed-metadata-repo-appstream-centos-8/

 

 

END

你可能感興趣的文章

[postfix] open /etc/postfix/main.cf: Permission denied 等錯誤 遇到開啟 /etc/postfix/main.cf: Permission denied 等錯誤解決

Centos7 的ifconfig和netstat Centos7 和RHEL 7 最小安裝中竟然沒有ifconfig和netstat?原來centos/rhel準備把這兩個指令作廢,那怎麼辦?

[Centos7] 安裝nodejs8+yarn 安裝nodejs 8+ yarn的過程記錄

使用mutt發信(LINUX直接寄信) mutt是一個簡易的發送程式,學會他就不用每次telnet mail server 煩死人

[Rocky9+Docker] Mariadb Cluster + HAPROXY + Docker compose 把mariadb多個節點放在同一個docker中建立叢集的作法到底可不可行?

[Centos7 8] postfix+DKIM 設定 信件總是被退?希望別的mail server相信我寄出的信?那麼你可以設定dkim。

隨機好文

[jQuery] 利用load()來達成ajax的寫法 jQuery中利用load()來達成ajax的寫法,也有人稱他是假的ajax,作法就是..

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

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

[CodeIgniter3] 解決無法上傳特定檔案(.sb2)的問題 上傳時出現The filetype you are attempting to upload is not allowed,要怎麼解決?

Smarty安裝 smarty 是著名的樣版引擎,非常的好用,用多了突然發現拿掉smarty反而不會寫php了,以下是安裝過程..