wsl centos7:Failed to get D-Bus connection: Operation not permitted
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
由于github下载不稳定,所以在此提供该文件的下载: