51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

查看selinux端口报错:policydb version 31 does not match my version range 15-30

概述

在执行命令时发现无法查看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 策略文件失败

解决办法

升级或重新该命令安装包即可。

[root@localhost ~]# yum update -y policycoreutils-python
赞(2)
未经允许不得转载:工具盒子 » 查看selinux端口报错:policydb version 31 does not match my version range 15-30