Ask Your Question

Why does dnf update return error?

asked 2017-06-18 22:31:42 -0600

murali gravatar image

When I execute dnf update it returns an error " Error: Failed to synchronize cache for repo 'fedo

edit retag flag offensive close merge delete


Please give us the outpur from

dnf repolist

Also, when did the problem start, or has it always been there?

villykruse gravatar imagevillykruse ( 2017-06-19 04:34:32 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-06-20 14:11:59 -0600

ssieb gravatar image

The first url actually forwards to an appropriate mirror. However, the directory is not valid. You have $releasever/26, but 26 is the $releasever. The second url appears to be valid, but maybe that mirror was down for a while. You should never have to put specific urls in anyway, the mirror manager metalink is the best option.

edit flag offensive delete link more



+1 Maybe put it even stronger. Don't mess with the repo files unless you really know what you are doing.

villykruse gravatar imagevillykruse ( 2017-06-20 14:24:24 -0600 )edit

The fedora repository works through many mirror sites, so you can download updates from a mirror near you. These mirrors comes and goes, and to keep track of that, the repository specifies a "metalink" emtry instead of a "baseurl". The "metalink". gives you two things:

An url for a working mirror site.

A checksum to ensure that the mirror doesn't serve wrong metadata.

A baseurl entry may work for a while, but may stop working at any time without warning.

Therefore: stick with the "metalink" entry only.

villykruse gravatar imagevillykruse ( 2017-06-22 02:26:23 -0600 )edit

answered 2017-06-20 08:39:47 -0600

murali gravatar image

updated 2017-06-20 14:06:29 -0600

ssieb gravatar image

It seems to be solved as that error is not recurring. I changed the lines in /etc/yum.repos.d/fedora.repo to :

name=Fedora $releasever - $basearch

In fact the problem was coming up even in Fedora 25 before I upgraded to F26 Alpha and continued. It became normal when I inserted the line relating to the ftp mirror ftp.yz.* (Line 2 above) . When it occurred again I commented out that line and uncommented the metalink line and " dnf update " worked well. I am at a loss to understand this behaviour and shall be thankful if anyone could figure it out.

Currently the output of $ sudo dnf repolist all

Last metadata expiration check: 0:01:06 ago on Tue 20 Jun 2017 06:56:52 PM IST.
repo id                                         repo name                                                                              status
*fedora                                         Fedora 26 - x86_64                                                                enabled: 53,919
fedora-cisco-openh264                  Fedora 26 openh264 (From Cisco) - x86_64                              disabled
fedora-cisco-openh264-debuginfo   Fedora 26 openh264 (From Cisco) - x86_64 - Debug                  disabled
heikoada-terminix                         Copr repo for terminix owned by heikoada                                 enabled:      9
livna                                  for 26 - x86_64 - Debug                                         disabled
mariadb                                      MariaDB                                                                                  enabled:     14
remi                                           Remi's RPM repository - Fedora 26 - x86_64                               enabled:  1,578
remi-debuginfo                            Remi's RPM repository for Fedora 26 - x86_64 - debuginfo            disabled
remi-php70-debuginfo                  Remi's PHP 7.0 RPM repository for Fedora 26 - x86_64 - debuginfo disabled
remi-php70-test-debuginfo           Remi's PHP 7.0 test RPM repository for Fedora 26 - x86_64 - debuginfo  disabled
remi-php71-debuginfo                  Remi's PHP 7.1 RPM repository for Fedora 26 - x86_64 - debuginfo         disabled
remi-php71-test-debuginfo           Remi's PHP 7.1 test RPM repository for Fedora 26 - x86_64 - debuginfo   disabled
remi-test                                   Remi's RPM repository - Testing - Fedora 26 - x86_64                              disabled
remi-test-debuginfo                    Remi's test RPM repository for Fedora 26 - x86_64 - debuginfo                  disabled
*updates                                   Fedora 26 - Updates Source                                                                enabled:  0
*updates-testing                       Fedora 26 - Test Updates Source                                                         enabled:  3,454
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-06-18 22:31:42 -0600

Seen: 604 times

Last updated: Jun 20 '17