[精讚] [會員登入]
2888

[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

你可能感興趣的文章

[Centos6] php5.3升級為php5.6 Centos6 + php5.6 升級

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

移除ssl 私鑰的密碼 現在用ssl產生私鑰會需要設定密碼,但是私鑰有密碼,啟動apache會失敗。

TFTP Server 安裝及使用 讓設備的網路設定檔或是韌體經由TFTP拷備出來,操作的方法

[Centos8] PHP7.2升級到7.4 在centos8中把php 7.2升到7.4版

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

隨機好文

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

[札記] 2016.7~12月札記 札記,只是札記

維修冰箱 維修冰箱

一個邏輯的錯誤刪了全部檔案的經驗 今天本來想做一件很簡單的事,但卻足足浪費我多一倍的時間,再加上刪掉我全部的檔案,原因只是因為我自己的邏輯錯誤。

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