[精讚] [會員登入]
2807

[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

你可能感興趣的文章

[Centos] 查看網路的流量 介紹 sar, iftop, nethogs, 和 vnstat 等流量監控程式

Linux ext3 系統下刪除檔案救回全記錄 今天一個不小心,下了 rm 的指令,從此奮戰一個下午,終於把檔案救回來,以下是全記錄...

[Centos7] selinux 修改網頁連線的埠號 想把網頁改到非標準的80埠,在selinux上要如何修改?

[CentOS8] 1.安裝JULIA 安裝及開始使用 JULIA

[Oracle9] 查看磁碟檔案類型、掛載和uuid linux 如何查看掛載的磁碟類型?此文做個整理。

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

隨機好文

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

談借錢 人借錢時手心向上頭向下,人還錢時手心向下頭向上

Linux shell 的date表示法 linux下SHELL中的date表示法

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

魔球中小女孩唱的歌 The show 魔球中小女孩唱的歌 The show