Ask Your Question

Error: Failed to synchronize cache for repo 'fedora'

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

Es02 gravatar image

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

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

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



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 -0500 )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 :

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

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




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

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

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

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

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

12 Answers

Sort by » oldest newest most voted

answered 2016-05-24 09:07:18 -0500

florian gravatar image

updated 2016-05-25 10:42:51 -0500

Problem could be that the server does currently doesn't provide the repository as configured:

If you go here , you will see that there is only a folder test (for F24_Alpha & F24_beta), but no folder 24

If $releasever in your fedora.repo points to 24 (instead of test/24_Beta), dnf will just not find the repo and its metadata.

As a quick workaround, you can comment (#) the existing baseurl line an add the following (in fedora.repo and fedora-updates.repo):

edit flag offensive delete link more


Folks, note that this answer is totally outdated...

florian gravatar imageflorian ( 2016-11-28 08:39:53 -0500 )edit

The identical error message can still happen. It happened to me a few days ago, on Fedora 24 and then 25.

In my case, the solution was to manually download and locally reinstall ca-certificates. I had corrupted the certifcate chain. I used RPM to do the actual re-installation

rpm --reinstall ./ca-certificates-2016.2.7-1.0.fc24.noarch.rpm
amusette gravatar imageamusette ( 2016-12-15 11:37:04 -0500 )edit

Same problem for me today on Fedora 25. Solved thanks to this answer. Just changed metalink to baseurl.

vain gravatar imagevain ( 2017-08-12 13:15:47 -0500 )edit

Same problem for me, using Fedora 26. Just changed metalink to baseurl.

wind39 gravatar imagewind39 ( 2017-12-27 08:22:49 -0500 )edit

answered 2016-07-19 16:51:05 -0500

caio.souza gravatar image

dnf may have problems if you are using some proxy configurations.

So if you are using, edit the file /etc/dnf/dnf.conf. Add the follow lines: proxy= proxy_username=proxy.user proxy_password=myproxypassword

If you are using a specific proxy, just add the follow line with you proxy adress and port: proxy=http://{adress}:{port}

After this try to run some dnf install/search command. For example: dnf install nano

edit flag offensive delete link more


This solved my problem. Thanks.

aman_singh gravatar imageaman_singh ( 2016-07-28 00:52:06 -0500 )edit

It worked for me. Thanks :)

Om Prakash gravatar imageOm Prakash ( 2016-10-17 02:36:19 -0500 )edit

I'v changed my system proxy and it resolved, thanks

zebardast gravatar imagezebardast ( 2016-12-20 00:49:59 -0500 )edit

Thank You It worked.

chaitanya5398 gravatar imagechaitanya5398 ( 2017-02-25 07:22:51 -0500 )edit

answered 2017-05-10 13:53:41 -0500

Please check if update URL's are resolving properly and DNS is working. I had this issue due to DNS. We need better Error Reporting from DNF.

edit flag offensive delete link more

answered 2017-08-30 19:28:38 -0500

acortes gravatar image

Yes, it can be DNS issue. Try checking /etc/resolv.conf and see if nameserver is set to something like

edit flag offensive delete link more

answered 2018-11-21 05:45:44 -0500

adioe3 gravatar image

I ran into this problem as well and it turns out /tmp was full. You can check with du -hs if it's chock full and if so, lose some things.

edit flag offensive delete link more

answered 2017-05-10 13:50:49 -0500

I have seen this issue happening in Fedora 25 as well, when DNS fails to resolve the update URL's. Maybe we need better Error Reporting from DNF.

edit flag offensive delete link more

answered 2018-08-15 23:37:22 -0500

I had this problem because I set firewall.d to accept HTTPS but not HTTP. I added HTTP and it resolved the issue.

edit flag offensive delete link more

answered 2017-09-09 21:54:24 -0500

I have nscd running. It was my problem. By doing a "ps -aux | grep nscd" and locating the process ID, perform a "kill" on that process ID number cleared up the issue. The nscd daemon restarts and behaves.

I'm guessing that nscd does not wait for the network service to fully start before it starts before caching host name to IP address entries.

edit flag offensive delete link more

answered 2016-11-28 06:53:12 -0500

There is something wrong with the trusted ciphers. FC24-25 defaults to FUTURE set of ciphers in /etc/crypto-policies/config. Changing that to default and running update-crypto-policies fixed this for me. Something is probably off in the FUTURE backends/gnutls.config.

With FUTURE even wget gets an error on the cert:

wget -p -O /dev/null ""
WARNING: combining -O with -r or -p will mean that all downloaded content
will be placed in the single file you specified.

--2016-11-28 13:51:25--
Resolving (,,, ...
Connecting to (||:443... connected.
ERROR: The certificate of ‘’ is not trusted.
ERROR: The certificate of ‘’ was signed using an insecure algorithm.
edit flag offensive delete link more


I would discuss this as a separate question. Has not much to do with the original post...

florian gravatar imageflorian ( 2016-11-28 08:41:33 -0500 )edit

answered 2016-05-25 03:22:36 -0500

As per florian above, the repo isn't configured correctly due to the 'test' folder in front of the 'releases' folder. I have a vm running F24_beta and rectified the issue by modifying the baseurl as follows:


This allowed me to update the repo successfully. I was then prompted about updates and updates-testing and had to uncomment the baseurl for those as well (remove the '#' at the start of the line) but that may have been something peculiar to how my VM connects to the internet rather than an actual problem with those repos.

edit flag offensive delete link more


Not sure, I completely understand the above - is updates-testing working? If yes, all fine. If not, do the same as you did for fedora.repo

florian gravatar imageflorian ( 2016-05-25 09:49:23 -0500 )edit

I was testing behind a corporate firewall/proxy, so not sure if there was some quirk with that, but I found that when I ran echo $releasever it didn't have anything set for the variable, might have been a temporary bug, but I ended up replacing $releasever with 24 for updates and updates-testing in the baseurl and then it worked, but note that updates and updates-testing do not use the /test/ subfolder in the baseurl. side note: I lodged this with bugzilla as Bug#: 1339860

t3rm1n4l gravatar imaget3rm1n4l ( 2016-05-25 20:09:28 -0500 )edit

Question Tools


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

Seen: 138,377 times

Last updated: Oct 03 '16