在centos7系统中直接通过yum安装dnf包管理工具,使用dnf命令时报错如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Traceback (most recent call last): File "/usr/bin/dnf", line 57, in <module> from dnf.cli import main File "/usr/lib/python2.7/site-packages/dnf/__init__.py", line 30, in <module> import dnf.base File "/usr/lib/python2.7/site-packages/dnf/base.py", line 29, in <module> import libdnf.transaction File "/usr/lib64/python2.7/site-packages/libdnf/__init__.py", line 3, in <module> from . import conf File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 17, in <module> _conf = swig_import_helper() File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 16, in swig_import_helper return importlib.import_module('_conf') File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named _conf |
解决办法:
1 |
yum install libdnf-devel |
原文链接:centos7安装dnf报错ImportError: No module named _conf,转载请注明来源!