zoukankan      html  css  js  c++  java
  • centos 7查看防火墙报错(已解决,之前安装过python3)

    [root@localhost ~]# service firewalld restart
    Redirecting to /bin/systemctl restart firewalld.service
    Job for firewalld.service failed because the control process exited with error code. See "systemctl status firewalld.service" and "journalctl -xe" for details.
    [root@localhost ~]# systemctl firewalld restart
    Unknown operation 'firewalld'.
    [root@localhost ~]# service firewalld stop
    Redirecting to /bin/systemctl stop firewalld.service
    [root@localhost ~]# service firewalld start
    Redirecting to /bin/systemctl start firewalld.service
    Job for firewalld.service failed because the control process exited with error code. See "systemctl status firewalld.service" and "journalctl -xe" for details.
    [root@localhost ~]# systemctl status firewall
    Unit firewall.service could not be found.
    [root@localhost ~]# firewall-cmd --state
    Traceback (most recent call last):
    File "/usr/bin/firewall-cmd", line 24, in <module>
    from gi.repository import GObject
    ModuleNotFoundError: No module named 'gi'

    以上提示中提到了“/usr/bin/firewall-cmd”,我们输入以下命令:

    vim /usr/bin/firewall-cmd

    修改第一行,在python后面添加数字2.7:

    保存退出即可

    ### 欢迎关注微信公众号“ **IT客**“ ,投稿邮箱 itkeyy@163.com

    ![](http://ww1.sinaimg.cn/large/006M5LK3ly1g5r7cupix3j30go0gon1i.jpg)

  • 相关阅读:
    敏捷开发第五天
    敏捷开发第四天
    系统用户分析模型
    第三天敏捷开发
    第二天敏捷开发
    敏捷开发第一天
    第三周学习总结
    [学习笔记]莫队算法
    【网络流】Modular Production Line
    [学习笔记]set的使用
  • 原文地址:https://www.cnblogs.com/simuhunluo/p/7824736.html
Copyright © 2011-2022 走看看