DNF Invalid Repo Configure

Dear All,

I had add a repo from internet following the guidline of this

dnf config-manager --add-repo /etc/yum.repos.d/ CentOS-Stream-PowerTools.repo
dnf config-manager --set-enabled powertools

I run into trouble to update or upgrade my system.

Errors during downloading metadata for repository ‘etc_yum.repos.d’:

  • Curl error (37): Couldn’t read a file:// file for file:///etc/yum.repos.d/repodata/repomd.xml [Couldn’t open file /etc/yum.repos.d/repodata/repomd.xml]
    Error: Failed to download metadata for repo ‘etc_yum.repos.d’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

This is the error.

How to solve it? Appreciate someone can help. Thanks.

That --add-repo looks seriously bad. Do:

ls -l /etc/yum.repos.d/
rpm -qf /etc/yum.repos.d/*

They tell us a lot.

Why are you mixing a CentOS repo with AlmaLinux?

Alma have their own PowerTools.