[精讚] [會員登入]
2898

[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

你可能感興趣的文章

EXCEL+phpPgAdmin 使用phpPgAdmin 匯出資料 直接使用phpPgAmin下載資料的方法

[Centos7] 新的防火牆firewalld Centos7新的防火牆firewalld 和前面的iptables有很大的不同

[CentOS] 新增修改及刪除使用者 新增、修改、刪除使用者和群組

[Linux] 刪除last/lastb登出入記錄 linux shell的登出入記錄

[CentOS] 設定和使用quota quota 的觀念已經很老了,不過每次都會忘記所以寫下來,有需要觀念的朋友請參看鳥哥的網站吧

[Linux] 使用tarball安裝下載PERL的tar檔模組 在Linux下,perl下載的pm模組,不使用cpan的安裝方法

隨機好文

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

[jQuery] select 元件的取值及給值 html中的元件select,在jquery中要如何使用?

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

NETCRAFT發現你的網站及作業系統 NETCRAFT可以發現你的網站及作業系統

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