2

I don't know how to describe my problem because I don't understand why it happen ... When i enter

sudo dnf install (any packet)

It return me this

Tor Project Repo               407  B/s | 264  B     00:00    
Error: Failed to download metadata for repo 'Tor': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Its obvious that Tor is related to that mess but i don't know why.

I tried nothing because I'm afraid to do something wrong. I'm on fedora 30. (english baguette)

Chris Maes
  • 35,025
  • 12
  • 111
  • 136
Sgt Shepard
  • 51
  • 1
  • 1
  • 5

5 Answers5

12

It seems like you have a broken repository. Probably you will find this repository in:

ls /etc/yum.repos.d/

there will probably be a file named tor*.repo. If you remove that file (or edit it to contain enabled=0), then dnf should start working correctly again.

Chris Maes
  • 35,025
  • 12
  • 111
  • 136
2

I tried this command and my problem fixed:

sudo rm -r /var/cache/dnf
Soheil Babadi
  • 562
  • 2
  • 4
  • 15
1

Failed to download metadata for repo ‘bintray–resin-io-redhat’: Cannot download repomd.xml: Cannot download repodata/repomd.xml

I was getting same error for kubernetes.repo. It got resolved by setting enabled=0 in /etc/yum.repos.d/kubernetes.repo. Now I can download other package (example Nginx that I was unable to download).

rene
  • 41,474
  • 78
  • 114
  • 152
0

Execute below commands.

mv /etc/yum.repos.d/fedora-updates.repo /tmp/
mv /etc/yum.repos.d/fedora-updates-modular.repo /tmp/
yum clean all
yum update
mozway
  • 194,879
  • 13
  • 39
  • 75
-4

This worked for me -

cd /etc/yum.repos.d

rm -rf .

yum upgrade

yum update

Note: redhat.repo will regenerate itself on the next yum run, and in the process some repositories will stay lost, be careful.

Scorpion_Veer
  • 49
  • 1
  • 2
  • 6
  • 1
    I advise against removing yum repositories like this. If you have added other repositories before, they will be gone after deleting. I don't think, that yum regenerates other repositories, if even the redhat repo itself. – nbsp Nov 23 '21 at 13:30
  • This is VERY bad advice. Do not listen to this guy. – gillytech Mar 05 '23 at 23:30