当我们想要查看防火墙运行情况,使用命令:systemctl status firewalld.service。发现如下错误:

解决办法:

暴力替换

mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py > /usr/bin/systemctl
chmod +x /usr/bin/systemctl

wsl centos7执行systemctl命令报错:Failed to get D-Bus connection,请看这篇

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐