zl程序教程

您现在的位置是:首页 >  系统

当前栏目

wsl centos7: Failed to get D-Bus connection: Operation not permitted

centos7Failed to not get Connection operation WSL
2023-09-14 09:01:58 时间

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