Failed to synchronize cache for repo

Generally to install the system I have a problem with the repo. When I want to get a program to get the result “Failed to synchronize cache for repo” I can not deal with it.
Sorry for my English.

Open Konsole and run:

$ sudo dnf clean all

$ sudo dnf <whatever_you_are_trying_to_do>

then if problems persist you can put the entire Konsole output including the command you used in a .txt file and post that here.

For more help look here.

:see_no_evil: :hear_no_evil: :speak_no_evil:

1 Like

Hello,
Below is the result

[root@skorek yum.repos.d]# sudo dnf install audacity
OpenMandriva Cooker - x86_64 - Source 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘cooker-x86_64-source’
OpenMandriva Cooker - x86_64 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘cooker-x86_64’
OpenMandriva 4.0 - x86_64 - Source 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘release-x86_64-source’
OpenMandriva Rock - x86_64 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘rock-x86_64’
OpenMandriva Rock - x86_64 - Updates 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘rock-updates-x86_64’
Ignorowanie repozytoriów: cooker-x86_64-source, cooker-x86_64, release-x86_64-source, rock-x86_64, rock-updates-x86_64
Brak wyników dla parametru: audacity
Błąd: Brak wyników: audacity
[root@skorek yum.repos.d]#

Did you run?

$ sudo dnf clean all

It is not a bad idea to run that before any dnf install or upgrade. If you did run that then add --refresh to the install command.

$ sudo dnf --refresh install audacity

If that does not work then you need to file a bug report at our Issue Tracker.

I just realized a big problem with what repositories are enabled. Apologies for not having seen this sooner. You have a number of source repositories enabled. Normally users don’t want to enable those (they are for package builder and maintainers not users). You also have mixed repositories in that you have repositories enabled for:

  1. cooker-x86_64, cooker-x86_64-source-which is development version not for users at all. (Remove these)

  2. release-x86_64-source (Remove this one)

  3. rock-x86_64, rock-updates-x86_64 (These are OK)

Assuming you want your system to be Rock like the ISO you installed from.

But in any event, and this is for all users, you don’t want to mix the various repository versions. Explanation If you have a default system that is Rock and you want Rock repositories only. If you want a Cooker system then you would use Cooker repositories only. But you ever mix them. That can and does lead to weird errors and dependency issues and possibly more.

So I would disable the above mentioned repos leaving rock-x86_64, rock-updates-x86_64

With those 2 only enabled run these commands in order presented:

$ sudo dnf clean all

$ sudo dnf upgrade

$ sudo dnf distro-sync

And hopefully that all runs and works and gets you back to an updated default Rock system.

And that is why I have attempted to write some “How To” articles here.

And also why we contributors have started slowly but surely working on documentation for the distro on the user side but we also need to write documentation for the contributors particularly at this time for Developer Group and QA Team.
These links might help with the issue in this thread.

https://wiki.openmandriva.org/en/OpenMandriva_Release_Plan_and_Repositories

How To edit repos for dnf in your OM Lx system

After reading those two then this one should make sense and work for you.

How To quickly enable/disable repos in Cooker (Applies to other versions if you edit the commands accordingly.)

I hope this helps. People can save themselves a lot of headache if they do a little reading before they start package management with a new system or new approach as we are.

Hello Ben,
I followed your instructions and I turned off the unnecessary repo, cleaned dnf, and still no effect! It looks like there is no internet ?!
Below is the result:

[root@skorek skorek]# sudo dnf --refresh install audacity
OpenMandriva Rock - x86_64 - Source 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘rock-x86_64-source’
OpenMandriva Rock - x86_64 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘rock-x86_64’
OpenMandriva Rock - x86_64 - Updates 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘rock-updates-x86_64’
Ignorowanie repozytoriów: rock-x86_64-source, rock-x86_64, rock-updates-x86_64
Brak wyników dla parametru: audacity
Błąd: Brak wyników: audacity

Below is the result of 2 repo;

[root@skorek yum.repos.d]# sudo dnf clean all
Usunięto 0 plików
[root@skorek yum.repos.d]# sudo dnf distro-sync
OpenMandriva Rock - x86_64 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘rock-x86_64’
OpenMandriva Rock - x86_64 - Updates 0.0 B/s | 0 B 00:15
Failed to synchronize cache for repo ‘rock-updates-x86_64’
Ignorowanie repozytoriów: rock-x86_64, rock-updates-x86_64
Rozwiązano zależności.
Nie ma nic do zrobienia.
Ukończono.
[root@skorek yum.repos.d]#

What did you install? Which ISO? Do the checksums for the ISO match? Are you connected to the internet? This issue probably needs a bug report.

For an easy and quick way to provide some information do this:

$ sudo sh /usr/bin/omv-bug-report.sh

That will create the file ‘omv-bug-report.log.xz’. Attach that file to any bug report and also upload that to this thread. That file may have enough so we have something to work on.

This is general information for all users. One of the first things anyone should do when you run into a problem with your computer or your operating system is to copy and paste the error message and do an internet search. Using the above as an example I used these search terms ‘Linux dnf Failed to synchronize cache for repo’. Try that and see what you find, could be illuminating.

Helpful hint from moderator. To post code as code use the </> icon. To learn this you can go back and edit previous posts so code is posted as code.

Try running these commands and copy and paste the entire output including the commands you use to a .txt file and attach that here.

$ sudo dnf clean all

$ sudo dnf -v upgrade

$ sudo dnf -v distro-sync

Post-edit: The -v is an option meaning ‘verbose’ so it may provide some addition information that will lead to a cause for this issue. (And I’m wondering why I did not think of this sooner, but I didn’t.)

In addition to @ben79 's advices:

Supposed you have internet working, system: 4.0/Rock, arch x86_64, try with:

https://abf.openmandriva.org/build_lists/554188

download packages into a new folder

openmandriva-repos-4.0-2-omv4000.x86_64.rpm
openmandriva-repos-keys-4.0-2-omv4000.noarch.rpm
openmandriva-repos-pkgprefs-4.0-2-omv4000.noarch.rpm

Then:
open konsole in the folder, run commands:

$ sudo dnf clean all ; dnf clean all
,

$ sudo dnf reinstall *.rpm

Then:
$ sudo dnf clean all ; dnf clean all ; dnf repolist

Hello Ben,
At the beginning I want to thank you for your help in the subject. Below are the answers you are asking about;

  1. I have an internet connection.
  2. I installed the system from a .iso DVD medium downloaded from the website SOURCEFORGET OpenMandrivaLx.4.0-plasma.x86_64.iso
Linux skorek 5.1.9-desktop-1omv4000 #1 SMP Tue Jun 11 15:14:12 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

[root@skorek skorek]# sudo dnf clean all
Usunięto 0 plików

[root@skorek skorek]# sudo dnf -v upgrade
Wczytane wtyczki: builddep, changelog, config-manager, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, repoclosure, repodiff, repograph, repomanage, reposync
DNF version: 4.2.6
cachedir: /var/cache/dnf
repo: downloading from remote: rock-x86_64
error: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release [Could not resolve host: mirrors.openmandriva.org] (http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release).
OpenMandriva Rock - x86_64 0.0 B/s | 0 B 00:15
Cannot download ‘http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release’: Cannot prepare internal mirrorlist: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release [Could not resolve host: mirrors.openmandriva.org].
Failed to synchronize cache for repo ‘rock-x86_64’
repo: downloading from remote: rock-updates-x86_64
error: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates [Could not resolve host: mirrors.openmandriva.org] (http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates).
OpenMandriva Rock - x86_64 - Updates 0.0 B/s | 0 B 00:15
Cannot download ‘http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates’: Cannot prepare internal mirrorlist: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates [Could not resolve host: mirrors.openmandriva.org].
Failed to synchronize cache for repo ‘rock-updates-x86_64’
Ignorowanie repozytoriów: rock-x86_64, rock-updates-x86_64
No module defaults found
–> Rozpoczynanie rozwiązywania zależności
–> Ukończono rozwiązywanie zależności
Rozwiązano zależności.
Nie ma nic do zrobienia.
Ukończono.
[root@skorek skorek]#

[root@skorek skorek]# sudo dnf -v distro-sync
Wczytane wtyczki: builddep, changelog, config-manager, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, repoclosure, repodiff, repograph, repomanage, reposync
DNF version: 4.2.6
cachedir: /var/cache/dnf
repo: downloading from remote: rock-x86_64
error: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release [Could not resolve host: mirrors.openmandriva.org] (http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release).
OpenMandriva Rock - x86_64 0.0 B/s | 0 B 00:15
Cannot download ‘http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release’: Cannot prepare internal mirrorlist: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=release [Could not resolve host: mirrors.openmandriva.org].
Failed to synchronize cache for repo ‘rock-x86_64’
repo: downloading from remote: rock-updates-x86_64
error: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates [Could not resolve host: mirrors.openmandriva.org] (http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates).
OpenMandriva Rock - x86_64 - Updates 0.0 B/s | 0 B 00:15
Cannot download ‘http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates’: Cannot prepare internal mirrorlist: Curl error (6): Couldn’t resolve host name for http://mirrors.openmandriva.org/mirrors.php?platform=rock&arch=x86_64&repo=main&release=updates [Could not resolve host: mirrors.openmandriva.org].
Failed to synchronize cache for repo ‘rock-updates-x86_64’
Ignorowanie repozytoriów: rock-x86_64, rock-updates-x86_64
No module defaults found
–> Rozpoczynanie rozwiązywania zależności
–> Ukończono rozwiązywanie zależności
Rozwiązano zależności.
Nie ma nic do zrobienia.
Ukończono.
[root@skorek skorek]#

`
[root@skorek Repo]# sudo dnf clean all ; dnf clean all
Usunięto 0 plików
Usunięto 0 plików
[root@skorek Repo]# sudo dnf reinstall *.rpm
OpenMandriva Rock - x86_64                                                                                                                              0.0  B/s |   0  B     00:15    
Failed to synchronize cache for repo 'rock-x86_64'
OpenMandriva Rock - x86_64 - Updates                                                                                                                    0.0  B/s |   0  B     00:15    
Failed to synchronize cache for repo 'rock-updates-x86_64'
Ignorowanie repozytoriów: rock-x86_64, rock-updates-x86_64
Pakiet openmandriva-repos-4.0-2.src nie jest zainstalowany, nie można go zainstalować ponownie.
Brak wyników dla parametru: openmandriva-repos-4.0-2.src.rpm
Rozwiązano zależności.
========================================================================================================================================================================================
 Pakiet                                                    Architektura                         Wersja                                 Repozytorium                               Rozm.
========================================================================================================================================================================================
Ponowne instalowanie:
 openmandriva-repos                                        x86_64                               4.0-2                                  @commandline                                13 k
 openmandriva-repos-keys                                   noarch                               4.0-2                                  @commandline                               9.1 k
 openmandriva-repos-pkgprefs                               noarch                               4.0-2                                  @commandline                               7.0 k

Podsumowanie transakcji
========================================================================================================================================================================================

Całkowity rozmiar: 29 k
Rozmiar po zainstalowaniu: 100 k
W porządku? [t/N]: t
Pobieranie pakietów:
Wykonywanie sprawdzania transakcji
Pomyślnie ukończono sprawdzanie transakcji.
Wykonywanie testu transakcji
Pomyślnie ukończono test transakcji.
Wykonywanie transakcji
  Przygotowywanie                :                                                                                                                                                  1/1 
  Ponowne instalowanie           : openmandriva-repos-pkgprefs-4.0-2.noarch                                                                                                         1/6 
  Ponowne instalowanie           : openmandriva-repos-keys-4.0-2.noarch                                                                                                             2/6 
  Ponowne instalowanie           : openmandriva-repos-4.0-2.x86_64                                                                                                                  3/6 
  Czyszczenie                    : openmandriva-repos-4.0-2.x86_64                                                                                                                  4/6 
  Czyszczenie                    : openmandriva-repos-keys-4.0-2.noarch                                                                                                             5/6 
  Czyszczenie                    : openmandriva-repos-pkgprefs-4.0-2.noarch                                                                                                         6/6 
  Sprawdzanie                    : openmandriva-repos-4.0-2.x86_64                                                                                                                  1/6 
  Sprawdzanie                    : openmandriva-repos-4.0-2.x86_64                                                                                                                  2/6 
  Sprawdzanie                    : openmandriva-repos-keys-4.0-2.noarch                                                                                                             3/6 
  Sprawdzanie                    : openmandriva-repos-keys-4.0-2.noarch                                                                                                             4/6 
  Sprawdzanie                    : openmandriva-repos-pkgprefs-4.0-2.noarch                                                                                                         5/6 
  Sprawdzanie                    : openmandriva-repos-pkgprefs-4.0-2.noarch                                                                                                         6/6 

Ponownie zainstalowano:
  openmandriva-repos-4.0-2.x86_64                         openmandriva-repos-keys-4.0-2.noarch                         openmandriva-repos-pkgprefs-4.0-2.noarch                        

Ukończono.
[root@skorek Repo]# sudo dnf clean all ; dnf clean all ; dnf repolist
Usunięto 0 plików
Usunięto 0 plików
OpenMandriva Rock - x86_64                                                                                                                              0.0  B/s |   0  B     00:15    
Failed to synchronize cache for repo 'rock-x86_64'
OpenMandriva Rock - x86_64 - Updates                                                                                                                    0.0  B/s |   0  B     00:15    
Failed to synchronize cache for repo 'rock-updates-x86_64'
Ignorowanie repozytoriów: rock-x86_64, rock-updates-x86_64
[root@skorek Repo]# 

omv-bug-report.log.xz (60,4 KB)

oh
I am out of ideas…
Sorry.

:cry::cry::cry::cry::cry::cry::cry::cry::cry::cry::cry::cry:

@Stan please upload here as attachment the file
/etc/yum.repos.d/openmandriva-rock-x86_64.repo

Just in case upload won’t accept the .repo extension, just add .txt to the filename.

Appears that your DNS is broken Post-edit: (Or for some other reason your internet is not seeing this as a valid URL):

So you probably did something wrong when you did whatever you did for this. Providing the information @rugyada requested above would tell us a lot.

Another thing I see is this:

The openmandriva-repos-4.0-2.src package is not installed, you can not install it again. No results for the parameter: openmandriva-repos-4.0-2.src.rpm

Post-edit:
What I would do: If I were in your shoes I would do a fresh install with the additional knowledge I have gained after checking that checksums match for the ISO I was using. Then you now know to not enable any source.repo files and to stick to Rock repos only.

Hello all,
Here is the contents of the yum directory

yum.repos .txt (4,9 KB)