[ SOLVED ] - DNF Repo Error - Failed to Download Metadata

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[ SOLVED ] - DNF Repo Error - Failed to Download Metadata

Postby jeevanism » Jul 15th, '20, 12:55

Hello All,

For some weird reasons, I have wiped out my /etc/yum.repos.d folder :cry:
Now my DNF is not working any more.
Code: Select all
[root@jeevanism dnf]# dnf repolist
No repositories available


whoever done such crazy for any reason, might get this helpful. You need to do as below -

Update --- the repos restored

I force installed


Code: Select all
    rpm -ivh mageia-repos-8-0.0.3.mga8.x86_64.rpm --force


which resulted the repo files back


Code: Select all
    [root@jeevanism yum.repos.d]# ls
    mageia-i586.repo          mageia-nonfree-x86_64.repo         mageia-tainted-i586.repo    mageia-tainted-x86_64-source.repo  mageia-x86_64-source.repo
    mageia-nonfree-i586.repo  mageia-nonfree-x86_64-source.repo  mageia-tainted-x86_64.repo  mageia-x86_64.repo




then I ran

Code: Select all
 
    [root@jeevanism yum.repos.d]# dnf update
    Mageia 8 - x86_64                                                                                                                      9.6  B/s | 311  B     00:32   
    Errors during downloading metadata for repository 'mageia-x86_64':
      - Status code: 404 for https://mirrors.kernel.org/mageia/distrib/8/x86_64/media/core/release/repodata/repomd.xml (IP: 198.145.21.9)
      - Status code: 404 for https://mirrors.mageia.org/metalink?distrib=mageia-8&arch=x86_64&section=core&repo=release (IP: 212.85.158.151)
    Error: Failed to download metadata for repo 'mageia-x86_64': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    Mageia 8 - x86_64 - Updates                                                                                                            8.9  B/s | 311  B     00:34   
    Errors during downloading metadata for repository 'updates-x86_64':
      - Status code: 404 for https://mirrors.mageia.org/metalink?distrib=mageia-8&arch=x86_64&section=core&repo=updates (IP: 212.85.158.151)
      - Status code: 404 for https://mirrors.kernel.org/mageia/distrib/8/x86_64/media/core/updates/repodata/repomd.xml (IP: 198.145.21.9)
    Error: Failed to download metadata for repo 'updates-x86_64': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    Ignoring repositories: mageia-x86_64, updates-x86_64
    Dependencies resolved.
    Nothing to do.
    Complete!


Now, how to solve this ? :| :cry:
Last edited by jeevanism on Jul 15th, '20, 17:18, edited 3 times in total.
jeevanism
 
Posts: 69
Joined: Sep 1st, '12, 05:28

Re: How to Create DNF repo from the scratch

Postby jeevanism » Jul 15th, '20, 15:13

OP is updated now :arrow:
Last edited by jeevanism on Jul 15th, '20, 15:58, edited 1 time in total.
jeevanism
 
Posts: 69
Joined: Sep 1st, '12, 05:28

Re: How to Create DNF repo from the scratch

Postby Bequimao » Jul 15th, '20, 15:38

Please show
Code: Select all
 # dnf repolist --all


/etc/yum.repos.d is provided by package mageia-repos. So you might reinstall that package.

Best regards
Bequimão
Bequimao
 
Posts: 108
Joined: Jun 3rd, '11, 21:51
Location: Minas Gerais, Brazil

Re: How to Create DNF repo from the scratch

Postby jeevanism » Jul 15th, '20, 15:55

Bequimao wrote:Please show
Code: Select all
 # dnf repolist --all


/etc/yum.repos.d is provided by package mageia-repos. So you might reinstall that package.

Best regards
Bequimão


thank you, I reinstalled by force now I have the repos but some errors shows as I mentioned in the UPDATED reply above
jeevanism
 
Posts: 69
Joined: Sep 1st, '12, 05:28

Re: EDITED - DNF Repo Error - Failed to Download Metadata

Postby Bequimao » Jul 15th, '20, 16:37

This is a working repolist

Code: Select all
[root@mga8-kde-vm ~]# dnf repolist
repo id                                                                          repo name
cauldron-x86_64                                                                  Mageia Cauldron - x86_64
cauldron-x86_64-nonfree                                                          Mageia Cauldron - x86_64 - Nonfree
cauldron-x86_64-tainted                                                          Mageia Cauldron - x86_64 - Tainted
[root@mga8-kde-vm ~]#


I created it as follows

Code: Select all
# dnf config-manager --set-disabled cauldron-updates-x86_64 mageia-x86_64  updates-x86_64
# dnf config-manager --set-enabled cauldron-x86_64-nonfree cauldron-x86_64-tainted


After final release you'll have to switch over again.

Bequimão
Bequimao
 
Posts: 108
Joined: Jun 3rd, '11, 21:51
Location: Minas Gerais, Brazil

Re: EDITED - DNF Repo Error - Failed to Download Metadata

Postby doktor5000 » Jul 15th, '20, 16:52

You can just reinstall the package with urpmi, no need to use rpm for that

Code: Select all
urpmi --replacepkgs --replacefiles mageia-repos
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: EDITED - DNF Repo Error - Failed to Download Metadata

Postby jeevanism » Jul 15th, '20, 16:59

doktor5000 wrote:You can just reinstall the package with urpmi, no need to use rpm for that

Code: Select all
urpmi --replacepkgs --replacefiles mageia-repos


thank you for the help.

I run the command as below
Code: Select all
[root@jeevanism yum.repos.d]# urpmi --replacepkgs --replacefiles mageia-repos


    http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/media/core/release/mageia-repos-8-0.0.3.mga8.x86_64.rpm
installing mageia-repos-8-0.0.3.mga8.x86_64.rpm from /var/cache/urpmi/rpms                                   
Preparing...                     ###########################################################################
      1/1: mageia-repos          ###########################################################################
      1/1: removing mageia-repos-8-0.0.3.mga8.x86_64
                                 ###########################################################################


then checked the yum.repos.d folder
Code: Select all
[root@jeevanism yum.repos.d]# ls
mageia-i586.repo            mageia-nonfree-x86_64-source.repo  mageia-tainted-x86_64-source.repo
mageia-nonfree-i586.repo    mageia-tainted-i586.repo           mageia-x86_64.repo
mageia-nonfree-x86_64.repo  mageia-tainted-x86_64.repo         mageia-x86_64-source.repo

and checked the repolist
Code: Select all
[root@jeevanism yum.repos.d]# dnf repolist
repo id                                          repo name
mageia-x86_64                                    Mageia 8 - x86_64
updates-x86_64                                   Mageia 8 - x86_64 - Updates
[root@jeevanism yum.repos.d]# dnf update
Mageia 8 - x86_64                                                              27  B/s |  51  B     00:01   
Error: Failed to download metadata for repo 'mageia-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Mageia 8 - x86_64 - Updates                                                    43  B/s |  51  B     00:01   
Error: Failed to download metadata for repo 'updates-x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Ignoring repositories: mageia-x86_64, updates-x86_64
Dependencies resolved.
Nothing to do.
Complete!
[root@jeevanism yum.repos.d]#


seems I have the wrong repo ? I think it should be cauldron repo. Because I am running Mageia 8 Alpha now -

so I done this command

Code: Select all
[root@jeevanism yum.repos.d]# urpmi --replacepkgs --replacefiles mageia-repos-cauldron

then

Code: Select all
[root@jeevanism yum.repos.d]# dnf config-manager --set-disabled cauldron-updates-x86_64 mageia-x86_64  updates-x86_64
[root@jeevanism yum.repos.d]# dnf config-manager --set-enabled cauldron-x86_64-nonfree cauldron-x86_64-tainted


Now, I run
Code: Select all
dnf update
and its working !!

thank you for the help. This is solved ! :P :) :D
jeevanism
 
Posts: 69
Joined: Sep 1st, '12, 05:28

Re: [ SOLVED ] - DNF Repo Error - Failed to Download Metada

Postby Bequimao » Jul 15th, '20, 17:43

# dnf update is deprecated.

You should use

Code: Select all
# dnf upgrade --refresh
Bequimao
 
Posts: 108
Joined: Jun 3rd, '11, 21:51
Location: Minas Gerais, Brazil

Re: [ SOLVED ] - DNF Repo Error - Failed to Download Metada

Postby jeevanism » Jul 16th, '20, 16:12

Bequimao wrote:# dnf update is deprecated.

You should use

Code: Select all
# dnf upgrade --refresh


thank you, I will use from now on. :)
jeevanism
 
Posts: 69
Joined: Sep 1st, '12, 05:28


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron