51工具盒子

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

升级python导致semanage缺失policy.so依赖

概述

由于前公司运维升级python导致缺少semanage命令关键依赖导致无法使用命令。

[root@localhost ~]# semanage port -l
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 32, in <module>
    import seobject
  File "/usr/lib64/python2.7/site-packages/seobject/__init__.py", line 36, in <module>
    import sepolicy
  File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 6, in <module>
    from . import policy as _policy
ImportError: /usr/lib64/python2.7/site-packages/sepolicy/policy.so: cannot open shared object file: No such file or directory

解决办法

[root@localhost ~]# rpm -q policycoreutils-python
policycoreutils-python-2.5-29.el7.aarch64
[root@localhost ~]# yum update -y policycoreutils-python
赞(0)
未经允许不得转载:工具盒子 » 升级python导致semanage缺失policy.so依赖