首页 > 编程语言 > 详细

centos 7查看防火墙报错(已解决,之前安装过python3)

时间:2017-11-13 10:21:21      阅读:3070      评论:0      收藏:0      [点我收藏+]

[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:

技术分享

保存退出即可

 

centos 7查看防火墙报错(已解决,之前安装过python3)

原文:http://www.cnblogs.com/simuhunluo/p/7824736.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!