wsl 運行的 centos 7,使用 service
命令提示 Failed to get D-Bus connection: Operation not permitted
錯誤,無法運行。
目前的解決辦法是更換 systemctl
文件:
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