Any idea about cannot access repo after upgraded from Fedora35 to 37?

The error looks like below, I guess the main reason is “Opening repository primary data has failed: No such file or directory.” Any idea about this error?

dnf -v update

Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, system-upgrade, uploadprofile
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

DNF version: 4.14.0
cachedir: /var/cache/dnf
User-Agent: constructed: ‘libdnf (Fedora Linux 37; workstation; Linux.x86_64)’
repo: using cache for: fedora-cisco-openh264
fedora-cisco-openh264: using metadata from Thu 06 Oct 2022 19:01:40 CST.
countme: no event for fedora-modular: window already counted
Fedora Modular 37 - x86_64 6.6 kB/s | 5.4 kB 00:00
reviving: ‘fedora-modular’ can be revived - metalink checksums match.
loading repo ‘fedora-modular’ failure: Opening repository primary data has failed: No such file or directory
Error: Loading repository ‘fedora-modular’ has failed

Try to refresh your dnf cache with:

dnf -v update --refresh

Thanks, tried and still failed. Below discussion solved my problem.
The history is very long, the answer is short for my problem.

Append “zchunk=false” to "/etc/dnf/dnf.conf ".

Here is my settings now:

Refered link:

Just a note beside your solution, to tune up your download speed (if your internet is fast enough!):


adding to your /etc/dnf/dnf.conf

Did you try cleaning the DNF cache before disabling that option?

sudo dnf clean all

Yes, did clean all and it did not work.

Thanks, got another tip from the thread, cheers!