Fedora Linux Support Community & Resources Center
  #1  
Old 10th January 2016, 10:06 PM
STEVE555 Offline
Registered User
 
Join Date: Nov 2004
Posts: 111
linuxfedorafirefox
dnf fails to update

Hi to everyone,
I'm having a problem with updating via dnf, I've repaetedly cleaned everything with dnf, but I'm still getting this error:
Code:
steve@localhost ~]$ sudo dnf clean all
Cleaning repos: fedora google-chrome
Cleaning up Everything
[steve@localhost ~]$ sudo dnf update
Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=x86_64/': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink]
Here is the contents of my fedora repo:
Code:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch/
enabled=1
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=28d
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
]
Any help will greatly appreciated,
Regards,
steve555

Last edited by STEVE555; 10th January 2016 at 10:08 PM. Reason: code links neded editing
Reply With Quote
  #2  
Old 10th January 2016, 10:08 PM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 3,641
linuxchrome
Re: dnf fails to update

And that's why I still use yum-deprecated. It may not help but you could try:

Code:
sudo yum-deprecated clean all
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates
Reply With Quote
  #3  
Old 10th January 2016, 10:24 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,022
linuxfedorafirefox
Re: dnf fails to update

Quote:
Originally Posted by STEVE555 View Post
Hi to everyone,
I'm having a problem with updating via dnf, I've repaetedly cleaned everything with dnf, but I'm still getting this error:
Code:
steve@localhost ~]$ sudo dnf clean all
Cleaning repos: fedora google-chrome
Cleaning up Everything
[steve@localhost ~]$ sudo dnf update
Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=x86_64/': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink]
Here is the contents of my fedora repo:
Code:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch/
enabled=1
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
You have both "metalink" and "baseurl" commented in, they are mutually exclusive and so are confusing dnf, comment out the "baseurl" with a "#" at front and leave metalink as is. (assuming you want to use mirrors). You can only have one of those commented in at a particular time.
Reply With Quote
  #4  
Old 10th January 2016, 10:37 PM
STEVE555 Offline
Registered User
 
Join Date: Nov 2004
Posts: 111
linuxfedorafirefox
Re: dnf fails to update

Hi marko,
I had commented out the base url line, but after a `sudo dnf clean all` and sudo dnf update` I'm still getting the sma e error here is the proof:
Code:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch/
enabled=0
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=28d
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
And Konsole output:
Code:
sudo dnf clean all
Cleaning repos: google-chrome fedora
Cleaning up Everything
[steve@localhost ~]$ sudo dnf update
google-chrome - x86_64                                                                                                                                                          57 kB/s | 3.4 kB     00:00    
Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=x86_64/': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink
Reply With Quote
  #5  
Old 10th January 2016, 10:42 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,022
linuxfedorafirefox
Re: dnf fails to update

The only difference between my working fedora.repo file and yours is you have that
extra "/" on the end of the metalink url for the fedora repo

I tried copying and pasting the metalink into firefox to prove that it can download the "metalink" file:

https://mirrors.fedoraproject.org/me...3&arch=x86_64/

results in a bad file -->
Quote:
head metalink
Quote:
<metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Sun, 10 Jan 2016 21:40:51 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager">
<!--
# repo = fedora-23 arch = x86_64/ error: invalid repo or arch
# following repositories are available:
https://mirrors.fedoraproject.org/metalink?repo=fedora-23&arch=x86_64

comes down as the valid xml 'metalink' file

try removing the ending "/" on your metalink line in your fedora.repo and retry it.

Last edited by marko; 10th January 2016 at 10:49 PM.
Reply With Quote
  #6  
Old 10th January 2016, 10:47 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 8,414
linuxfedorafirefox
Re: dnf fails to update

Quote:
Originally Posted by STEVE555 View Post
Hi marko,
I had commented out the base url line, but after a `sudo dnf clean all` and sudo dnf update` I'm still getting the sma e error here is the proof:
Code:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch/
enabled=0
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=28d
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
And Konsole output:
Code:
sudo dnf clean all
Cleaning repos: google-chrome fedora
Cleaning up Everything
[steve@localhost ~]$ sudo dnf update
google-chrome - x86_64                                                                                                                                                          57 kB/s | 3.4 kB     00:00    
Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=x86_64/': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink
You don't even have the Fedora repo enabled in your repo file. I believe that Fedora requires it to be enabled (it's the base Fedora repo... Others are optional), and gets sick if you don't.

Try changing your repo file above to have the fedora repo enabled.

Code:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch/
enabled=1
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

---------

Change just the first section for the fedora repo. Leave the debuginfo and source sections disabled.
Reply With Quote
  #7  
Old 10th January 2016, 10:51 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,022
linuxfedorafirefox
Re: dnf fails to update

Quote:
Originally Posted by DBelton View Post
Change just the first section for the fedora repo. Leave the debuginfo and source sections disabled.
and I think he has the misformatting of the metalink (see post 5)
Reply With Quote
  #8  
Old 10th January 2016, 11:18 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 8,414
linuxfedorafirefox
Re: dnf fails to update

I believe he has an extra / on the end of his metalink statement. I don't think it's supposed to have the ending /

Other than that, the metalink looks fine to me.
Reply With Quote
  #9  
Old 11th January 2016, 12:20 AM
STEVE555 Offline
Registered User
 
Join Date: Nov 2004
Posts: 111
linuxfedorafirefox
Re: dnf fails to update

Hi all,
I have done what you have suggested, but I'm still getting the error, here the edited fedora.repo:
Code:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False]
Regards,
steve555

Last edited by STEVE555; 11th January 2016 at 12:21 AM. Reason: code not working
Reply With Quote
  #10  
Old 11th January 2016, 05:20 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,022
linuxfedorafirefox
Re: dnf fails to update

Quote:
Originally Posted by STEVE555 View Post
Hi all,
I have done what you have suggested, but I'm still getting the error, here the edited fedora.repo:
Code:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=28d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
Regards,
steve555
Well, I still suggest you put a "#" in front of the baseurl but that doesn't seem to be the problem
but it still is more correct than having it ambiguous.

I don't really see the problem, maybe you have a networking issue.

Maybe you can download the fedora-repos package and just reinstall the package (that's the one that contains the repo files) directly with
the rpm command.

Did you try using "yum-deprecated clean all" then "yum-deprecated update" (see post #2) ? You might just need to get the current packages especially the
newest dnf packages and the issue might go away. I personally have good luck with the current dnf version which is 1.1.5

Last edited by marko; 11th January 2016 at 05:26 AM.
Reply With Quote
  #11  
Old 11th January 2016, 06:14 AM
STEVE555 Offline
Registered User
 
Join Date: Nov 2004
Posts: 111
linuxfedorafirefox
Re: dnf fails to update

Hi marko,
I've tried to download and install both the fedora-release and system-release, as they both depended on each othe. I tried using `rpm -ivh on both packages, but they wouldn't install without either one of them already installed.

So I finally managed to resolve the problem by installing the fedora-repo package via apper.

I want to thank you all for helping me out.

Regards,
steve555
Reply With Quote
  #12  
Old 11th January 2017, 12:48 PM
karthik2002 Offline
Registered User
 
Join Date: Jan 2017
Location: India
Posts: 1
linuxfedorafirefox
Re: dnf fails to update

I have the same problem. Unfortunately, apper fails to install due to dependency issues. I am on F25. Here is my fedora.repo

[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

Please help.
Reply With Quote
Reply

Tags
dnf, fails, update

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
F21 update fails nvsoar Using Fedora 2 24th March 2015 03:05 AM
fedora 16 gnome fails system fails on initial update reboot edeziffel Installation, Upgrades and Live Media 1 4th April 2012 06:43 PM
Update fails ventsyv Using Fedora 3 25th September 2011 06:54 PM
Yum update fails in F11 m.nassar Using Fedora 4 6th July 2009 05:52 AM
Yum update fails!! Rupam Bezbarua Installation, Upgrades and Live Media 3 6th July 2006 03:36 AM


Current GMT-time: 22:52 (Sunday, 26-03-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat