运行 audit2allow 时 Python selinux 模块循环导入

运行 audit2allow 时 Python selinux 模块循环导入

运行 audit2allow 时出现该错误,我使用的是 python 3,错误如下。不过,我在 python 2 中没有看到这个问题:

build:~$ python --version
Python 3.9.18


build:~$ audit2allow 
Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 25, in <module>
    import sepolgen.audit as audit
  File "/usr/lib/python3/dist-packages/sepolgen/audit.py", line 23, in <module>
    from . import refpolicy
  File "/usr/lib/python3/dist-packages/sepolgen/refpolicy.py", line 21, in <module>
    import selinux
  File "/usr/lib/python3/dist-packages/selinux/__init__.py", line 13, in <module>
    from . import _selinux
ImportError: cannot import name '_selinux' from partially initialized module 'selinux' (most likely due to a circular import) (/usr/lib/python3/dist-packages/selinux/__init__.py)

有什么想法可能缺少什么吗?

相关内容