Ask Your Question
4

Error: Failed to synchronize cache for repo 'fedora'

asked 2016-05-23 01:25:56 -0600

Es02 gravatar image

updated 2017-01-13 15:48:01 -0600

mattdm gravatar image

Fresh install of FC24 from USB, any time I attempt to install anything through DNF I get the following:

# dnf install nano
Repository InstallMedia has no mirror or baseurl set.
Error: Failed to synchronize cache for repo 'fedora'

Theres nothing wierd in my dnf config:

# cat /etc/dnf/dnf.conf
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True

The .repo file in /etc/yum.repos.d/fedora.repo looks fine to me so I'm not sure where to go from here.

edit retag flag offensive close merge delete

Comments

1

Usually this means that either your internet connection is not working or the mirror you are trying to reach is down (or has problems).

Please post /etc/yum.repos.d/fedora.repo, and /etc/yum.repos.d/fedora-updates.repo in your question above (I know, you said it's fine, let's just double-check).

Did you already try sudo dnf clean all && sudo dnf upgrade?

florian gravatar imageflorian ( 2016-05-23 11:47:18 -0600 )edit

Yes I've done a clean all and an upgrade - I get the same error every time I try to do anything with dnf unless I disable the repo.

Contents of the .repo file is : http://pastebin.com/G6Lqz9wX

Es02 gravatar imageEs02 ( 2016-05-23 18:28:13 -0600 )edit

Please see my answer below. You need to change line 5 of your fedora.repo from

baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/

to

baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/test/24_Beta/Everything/$basearch/os/

This is a weird bug, and not all Beta users are experiencing this. Please consider reporting the bug on bugzilla.redhat.com .

Also change that line back as soon as Fedora 24 is released.

florian gravatar imageflorian ( 2016-05-25 10:42:20 -0600 )edit

You may have to do the same for fedora-updates-testing.repo

florian gravatar imageflorian ( 2016-05-25 10:46:11 -0600 )edit

12 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-15 02:37:35 -0600

Danh Hoang gravatar image

updated 2016-10-03 06:03:23 -0600

In files /etc/yum.repos.d/fedora.repo, and /etc/yum.repos.d/fedora-updates.repo, I remove "s" in 'https": From

baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/

metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch

to

baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/

metalink=http://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch

and it works for my case.

edit flag offensive delete link more

Comments

Also worked for me! Tnx

dhendriks gravatar imagedhendriks ( 2016-09-29 03:42:40 -0600 )edit

Not a good idea to go for http instead of https

Baseurl is a http but metalink (which is the mirror service that you should use!) should remain https

gobigobi66 gravatar imagegobigobi66 ( 2016-10-03 10:50:34 -0600 )edit

Ir worked for me! Thanks

Satanas gravatar imageSatanas ( 2016-10-07 19:24:15 -0600 )edit
1

Also worked for me, but isn't changing the meta link from https to a less secure http url is a bad choice ?

kumargaurav gravatar imagekumargaurav ( 2016-11-07 14:24:29 -0600 )edit

Question Tools

Stats

Asked: 2016-05-23 01:25:56 -0600

Seen: 138,331 times

Last updated: Oct 03 '16