ある日急に、
$ sudo systemctl start firewalld
Job for firewalld.service failed because the control process exited with error code. See "systemctl status firewalld.service" and "journalctl -xe" for details.
不思議に思ってfirewall-cmdを直接叩くと
# firewall-cmd --list-all
Traceback (most recent call last):
File "/usr/bin/firewall-cmd", line 24, in <module>
from gi.repository import GObject
ImportError: No module named 'gi'
giが見つからない?
python-giというパッケージがあるようなので試しにyumで入れようとすると
# yum install python-gi
File "/bin/yum", line 30
except KeyboardInterrupt, e:
^
SyntaxError: invalid syntax
Syntaxエラー?
もしかして...
# ll /usr/bin/python
lrwxrwxrwx. 1 root root 14 9月 19 14:38 /usr/bin/python -> /bin/python3.4
誰だpython3をシステムに入れたのは...。
取り急ぎ↓で復元
# wget https://buildlogs.centos.org/c7.1708.00/python/20170803235814/2.7.5-58.el7.x86_64/python-2.7.5-58.el7.x86_64.rpm
# rpm -Uhv --force python-2.7.5-58.el7.x86_64.rpm