如下:
[root@localhost conf]# firewall-cmd --query-port=8020/tcp
Traceback (most recent call last):
File "/usr/bin/firewall-cmd", line 24, in <module>
from gi.repository import GObject
ImportError: No module named 'gi
其实当输入 firewall-cmd 系列的命令的时候都会报错
[root@localhost gi-1.2]# firewall-cmd --query-port=8020/tcp
Traceback (most recent call last):
File "/usr/bin/firewall-cmd", line 24, in <module>
from gi.repository import GObject
ImportError: No module named 'gi.repository'
此时应该启动或者查看centos7的防火墙:systemctl start firewalld
还会报如下错
Job for firewalld.service failed because a timeout was exceeded.See "systemctl status firewalld.service" and "journalctl -xe" for details.
此时,看我的这篇博客:点击打开链接