I just installed Rocky 8.5 on a laptop and then did
sudo dnf up
About 500 items were downloaded, and the installation began.
The update got hung up when running an update script for se_linux, and the laptop would beep every 5 seconds or so.
I tried Ctrl-C to exit the update process but that did not work, so I hard-rebooted the computer.
Now when I run a dnf command such as
sudo dnf up
I get:
Traceback (most recent call last):
File “/usr/lib64/python3.6/site-packages/libdnf/error.py”, line 14, in swig_import_helper
return importlib.import_module(mname)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 658, in _load_unlocked
File “”, line 571, in module_from_spec
File “”, line 922, in create_module
File “”, line 219, in _call_with_frames_removed
ImportError: /lib64/librepo.so.0: file too shortDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/bin/dnf”, line 57, in
from dnf.cli import main
File “/usr/lib/python3.6/site-packages/dnf/init.py”, line 30, in
import dnf.base
File “/usr/lib/python3.6/site-packages/dnf/base.py”, line 29, in
import libdnf.transaction
File “/usr/lib64/python3.6/site-packages/libdnf/init.py”, line 8, in
from . import error
File “/usr/lib64/python3.6/site-packages/libdnf/error.py”, line 17, in
_error = swig_import_helper()
File “/usr/lib64/python3.6/site-packages/libdnf/error.py”, line 16, in swig_import_helper
return importlib.import_module(‘_error’)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named ‘_error’
I tried:
dnf clean all
But that did not help.
Any help is appreciated.