报错如下所示:

centos7+python3.6下执行firewall-cmd命令提示“ModuleNotFoundError:no module named ‘gi’ ”

原因:由于python版本非系统自带的2.7导致该文件执行有误

解决方法:

vi /usr/bin/firewall-cmd  

将第一行#!/usr/bin/python -Es

修改为 #!/usr/bin/python2.7 -Es  保存并退出再次执行firewall-cmd即可。

centos7+python3.6下执行firewall-cmd命令提示“ModuleNotFoundError:no module named ‘gi’ ”


相关文章:

  • 2022-12-23
  • 2021-09-01
  • 2021-10-27
  • 2022-12-23
  • 2021-06-24
  • 2022-02-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案