概述
在执行命令时发现无法查看selinux
开放的端口列表。
[root@localhost ~]# semanage port -l
ERROR: policydb version 31 does not match my version range 15-30
ERROR: Unable to open policy //etc/selinux/targeted/policy/policy.31.
Traceback (most recent call last):
File "/usr/sbin/semanage", line 32, in <module>
import seobject
File "/usr/lib/python2.7/site-packages/seobject/__init__.py", line 36, in <module>
import sepolicy
File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 907, in <module>
raise e
ValueError: 读取 //etc/selinux/targeted/policy/policy.31 策略文件失败
解决办法
升级或重新该命令安装包即可。
代码语言:javascript复制[root@localhost ~]# yum update -y policycoreutils-python