Traceback (most recent call last): File "/usr/bin/firewall-cmd", line 24, in from gi.

lm_y發表於2017-09-20


如下:

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


此時,看我的這篇部落格:點選開啟連結

相關文章