English
Ask Your Question
-1

Why does dnf update return error?

asked 2017-06-19 03:31:42 +0000

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

Comments

Please give us the outpur from

dnf repolist

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

villykruse ( 2017-06-19 09:34:32 +0000 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2017-06-20 19:11:59 +0000

Samuel Sieb 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

Comments

1

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

villykruse ( 2017-06-20 19:24:24 +0000 )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 ( 2017-06-22 07:26:23 +0000 )edit
0

answered 2017-06-20 13:39:47 +0000

murali gravatar image

updated 2017-06-20 19:06:29 +0000

Samuel Sieb 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
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/26/$basearch/os/
#baseurl=http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora-projects/fedora/linux/releases/test/26_Alpha/Everything/x86_64/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=28d
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

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                                           rpm.livna.org 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
1 follower

Stats

Asked: 2017-06-19 03:31:42 +0000

Seen: 65 times

Last updated: Jun 20