Hide Forgot
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 Build Identifier: Trying to run audit2allow results in an error: [root@nas ~]# audit2allow Traceback (most recent call last): File "/usr/bin/audit2allow", line 25, in <module> import sepolgen.audit as audit File "/usr/lib64/python3.5/site-packages/sepolgen/audit.py", line 23, in <module> from . import refpolicy File "/usr/lib64/python3.5/site-packages/sepolgen/refpolicy.py", line 21, in <module> import selinux File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 1441, in <module> selinux_snapperd_contexts_path = _selinux.selinux_snapperd_contexts_path AttributeError: module '_selinux' has no attribute 'selinux_snapperd_contexts_path' Reproducible: Always Steps to Reproduce: 1. Run audit2allow Actual Results: Traceback (most recent call last): File "/usr/bin/audit2allow", line 25, in <module> import sepolgen.audit as audit File "/usr/lib64/python3.5/site-packages/sepolgen/audit.py", line 23, in <module> from . import refpolicy File "/usr/lib64/python3.5/site-packages/sepolgen/refpolicy.py", line 21, in <module> import selinux File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 1441, in <module> selinux_snapperd_contexts_path = _selinux.selinux_snapperd_contexts_path AttributeError: module '_selinux' has no attribute 'selinux_snapperd_contexts_path' Running Fedora Server 24 all packages up to date.
So far it seems that the issue is caused by having multiple versions of libselinux-python in your system, or by incomplete dnf transaction. eg. both: libselinux-python-2.5-9.fc24.x86_64 libselinux-python-2.5-3.fc24.x86_64 Removing older versions or reinstallining libselinux package (in case only 1 version is present) should fix the issue. *** This bug has been marked as a duplicate of bug 1358487 ***