Ask Your Question
1

Failed to synchronize cache for repo 'updates' fedora25

asked 2017-04-12 16:48:20 -0500

Rene Garnica gravatar image

When I try update or install a package, fedora25 show me this message

  Error: Failed to synchronize cache for repo 'updates'7%

How I can fix that problem?

Here my repositories list

repo id                     repo name                                     status
adobe-linux-x86_64          Adobe Systems Incorporated                         3
*fedora                     Fedora 25 - x86_64                            51,669
folkswithhats               Repository for Fedy                               26
google-chrome               google-chrome                                      3
*rpmfusion-free             RPM Fusion for Fedora 25 - Free                  541
*rpmfusion-free-updates     RPM Fusion for Fedora 25 - Free - Updates        179
*rpmfusion-nonfree          RPM Fusion for Fedora 25 - Nonfree               169
*rpmfusion-nonfree-updates  RPM Fusion for Fedora 25 - Nonfree - Updates      44
skype-stable                skype (stable)                                     2
*updates                    Fedora 25 - x86_64 - Updates                  18,593
virtualbox                  Fedora 25 - x86_64 - VirtualBox                    5

Here the content of fedora.repo file

[Remy@localhost ~]$ cat /etc/yum.repos.d/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
[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=7d
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/tree/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
edit retag flag offensive close merge delete

Comments

1

You might try sudo dnf clean all to clear any cached downloads, and see if sudo dnf update refreshes the cache with fresh information. Make sure your internet connection is stable, so you do not get interrupted.

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-04-12 17:23:03 -0500 )edit
1

you are writing that your 'updates' repo isn't refreshing but you are posting fedora.repo. If you expect something could be wrong with the .repo file (have you messed around with it?), then take a look at fedora-updates.repo.

If you haven't messed around with the file, I bet it's a problem with your internet connection, your providers DNS or the mirror itself. Just try again!

florian gravatar imageflorian ( 2017-04-13 11:44:29 -0500 )edit

You can

change "metadata_expire=7d" to "metadata_expire=1d" ...
davidva gravatar imagedavidva ( 2017-04-13 11:45:03 -0500 )edit

@davidva: Your comment is unrelated.

genodeftest gravatar imagegenodeftest ( 2017-04-17 16:37:54 -0500 )edit
1

By the way, you really should not use fedy, it is very insecure and unsafe. See https://ask.fedoraproject.org/en/ques... for details.

genodeftest gravatar imagegenodeftest ( 2017-04-17 16:45:46 -0500 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2017-08-03 09:05:24 -0500

peterreed gravatar image

You could try dnf clean metadata to clean the metadata cache and then on to dnf update. I personally like going for the hammer and use dnf clean all. From man dnf see below.

Clean Command Performs cleanup of temporary files kept for repositories. This includes any such data left behind from disabled or removed repositories as well as for different distribution release versions.

  dnf clean dbcache
          Removes cache files generated from the repository metadata. This forces DNF to regenerate the cache files the next time it is run.

  dnf clean expire-cache
          Marks the repository metadata expired. DNF will re-validate the cache for each repo the next time it is used.

  dnf clean metadata
          Removes repository metadata. Those are the files which DNF uses to determine the remote availability of packages. Using this  option  will
          make DNF download all the metadata the next time it is run.

  dnf clean packages
          Removes any cached packages from the system.

   dnf clean all
          Does all of the above.
edit flag offensive delete link more
1

answered 2017-08-03 07:42:01 -0500

Alan Ian Ross gravatar image

updated 2017-08-03 14:10:33 -0500

Unfortunately, the one described in the opening question is still the standard behavior in Fedora 26.

Edition: Fedora 26 Server (no graphical user interface, no windows manager, only the barebones system) installed as a virtual system in VMware WS Player 12.5.7 running on top of Ubuntu 16.04.3.

Behavior: the

# dnf update

command still gets

Error: Failed to synchronize cache for repo 'updates'

when used

  1. with networking set up in bridged mode in VMware, and
  2. repos (both in /etc/yum.repos.d/fedora.repo and in /etc/yum.repos.d/fedora-updates.repo) address format set up in https, wherever it is set up as such in the two config files.

Turning "https" into "http" makes the error disappear, and dnf returns to its regular behavior. Unfortunate: but true.

The issue, by the way, can't be related with some mistake in the network setup, or a malfunctioning in my internet connection: because, for example,

$ lynx www.tldp.org

(or, for that matter, any other URL) works perfectly.

By the way n°2: if, instead of using the VMware network infrastructure in bridged mode, I use it in NAT mode, dnf keeps on working flawlessly, even without turning the "https" into "http" in the two previously mentioned config files...

N.B.: none of the other fixes found around (here and elsewhere), from adding a

proxy="http://<my_proxy>:<port>"

line in /etc/dnf/dnf.conf (see e.g. here), to reinstalling ca-certificates-2017.2.14-1.0.fc26.noarch.rpm (e.g. here), to (re)installing "librepo / python-librepo" (e.g. here), seems to work in this case.

For the record, I add that I've recently upgraded from Fedora 25 to Fedora 26 (with the same underlying VMware setup): but in Fedora 25 the very same behavior happened.

Hope this can help (maybe for a diagnosis)...

edit flag offensive delete link more

Comments

lynx www.tldp.org

was a bad example, Apperantly that site does not support https. Better, perhaps

lynx 'https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-26&arch=x86_64'
villykruse gravatar imagevillykruse ( 2017-08-04 06:50:03 -0500 )edit

Question Tools

Stats

Asked: 2017-04-12 16:48:20 -0500

Seen: 13,776 times

Last updated: Aug 03 '17