[精讚] [會員登入]
2777

[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

你可能感興趣的文章

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

[BASH] 自建檔案拷背程式--把指定的檔案拷背到指定的位置。 Git 是很好用的版本控制程式,但我沒辦法使用。 原因就是資安。用SHELL自建簡易的GIT

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

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

[Centos7] 安裝apache+php7+mariadb10+selinux Centos7 安裝apache+php7+mariadb10+selinux

[CENTOS7] 使用 logrotate 來整理mongo日誌檔 解決 mongo 的日誌檔不斷長大的問題

隨機好文

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

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

PHP for sphinx 函式庫安裝 PECL/sphinx PHP>= 5.2.2 已經能原生支援 sphinx,可是預設的沒有裝,我們得自己裝才能用

[Windows7] 移除IE10及移除IE11 Windows7 不得已的情況要移除IE11或IE10怎麼做?

維修冰箱 維修冰箱