After upgrading from CentOS 7 to Alma Linux 8 yum and dnf not working

Following error are occurred when running command yum update or dnf update,

[root@cpanel1 ~]# yum update
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: libbrotlidec.so.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/yum”, 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’

kindly help us to resolve our issue as soon as possible Thanks,

Looks like you’re missing the libbrotli package.

1 Like

Same i try to update from centos 7 to alma 8 on linode machine

i able to login into Lish but its showing Failed NetworkManager

root@vauu [~]# sudo /usr/sbin/NetworkManager --no-daemon --log-level=DEBUG
/usr/sbin/NetworkManager: error while loading shared libraries: libbrotlidec.soy

i am not able to see whm cpanel

also when i run yum update below error come

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: libbrotlidec.so.1: cannot open shared object file: No such file ory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/yum”, line 61, 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_ir
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’