今天对系统默认的Python进行了升级,结果使用firewall-cmd --permanent --zone=public --add-port= 开启防火墙端口的时候报错:

1
2
3
4
5
6
7
8
9
10
Traceback (most recent call last):
File "/bin/firewall-cmd", line 31, in <module>
from firewall.client import FirewallClient, FirewallClientIPSetSettings, \
File "/usr/lib/python3.6/site-packages/firewall/client.py", line 29, in <module>
import slip.dbus
File "/usr/lib/python3.6/site-packages/slip/dbus/__init__.py", line 8, in <module>
from . import service
File "/usr/lib/python3.6/site-packages/slip/dbus/service.py", line 30, in <module>
from six import with_metaclass
ModuleNotFoundError: No module named 'six'

修复:

1
cp /usr/local/lib/python3.6/site-packages/six.py /usr/lib/python3.6/site-packages/