ImportError: No module named selinux
/usr/bin/semodule_expand tmp/test.lnk tmp/policy.bin
/usr/bin/sepolgen-ifgen -p tmp/policy.bin -i policy -o tmp/output Traceback
(most recent call last): File "/usr/bin/sepolgen-ifgen", line 34, in
<module> import selinux ImportError: No module named selinux make: ***
[validate] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.bEqivE
yum install libselinux-python
I have it installed, though I think I found what is causing the above error.
When I compiled all core selinux-related dependencies, I based them on
python 3 instead of python 2. I am still on the "old" version of python
2 (the one which comes with FC13), because in order to upgrade it I have
to also do that for another 100+ packages I have on my system and that
it is something I can't undertake at the moment.
I assumed, wrongly as it turned out, that python 3 would be 100%
replacement for python 2 and since I remember the nightmare I had to go
through when I did the same exercise when upgrading the core selinux
tools in order to bring them to the FC15 level and trying to make this
work with the "old" python 2 version I've had on my system, I thought I
could get away with just using python 3 this time.
Well, that didn't work and it looks as though python 2 is also needed (a
fact I confirmed a couple of hours after writing my original post as
/usr/bin/sepolgen-ifgen uses python 2, not python 3), so I am probably
going to have to go through the same exercise as before. Luckily for me,
I still keep my old patches, so I am hoping that all is not lost.
On an unrelated note - I seem to remember (probably by reading it on
this ML) that there are changes in the language syntax for the new
version of the tools/policy. What are these changes and where can I find
a doc/man pages to get myself up to speed?
selinux mailing list