Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

write_main() failed to re-load written solv file

Power went out when running dnf upgrade --refresh. Now dnf throws:

[root@fedora cache]# dnf upgrade --refresh
write_main() failed to re-load written solv file

tail -50 /var/log/dnf.log

...

2018-11-15T00:06:43Z INFO --- logging initialized ---
2018-11-15T00:06:43Z DDEBUG timer: config: 3 ms
2018-11-15T00:06:43Z DEBUG Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, repoclosure, repograph, repomanage, reposync
2018-11-15T00:06:43Z DEBUG DNF version: 2.7.5
2018-11-15T00:06:43Z DDEBUG Command: dnf update --refresh
2018-11-15T00:06:43Z DDEBUG Installroot: /
2018-11-15T00:06:43Z DDEBUG Releasever: 28
2018-11-15T00:06:43Z DEBUG cachedir: /var/cache/dnf
2018-11-15T00:06:43Z DDEBUG Base command: update
2018-11-15T00:06:43Z DDEBUG Extra commands: ['update', '--refresh']
2018-11-15T00:06:43Z DDEBUG repo: downloading from remote: updates, _Handle: metalnk: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f28&arch=x86_64, mlist: None, urls [].
2018-11-15T00:07:53Z SUBDEBUG
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1015, in run
    self._process_demands()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 768, in _process_demands
    load_available_repos=self.demands.available_repos)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 475, in fill_sack
    self._add_repo_to_sack(r)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 147, in _add_repo_to_sack
    load_updateinfo=True)
OSError: write_main() failed to re-load written solv file
2018-11-15T00:07:53Z CRITICAL write_main() failed to re-load written solv file
2018-11-15T00:07:53Z DDEBUG Cleaning up.

if I do dnf clean all and then dnf <pretty-much-anything> it seems to repopulate (perhaps not completely) /var/cache/dnf, but still throws the same error.