Ask Your Question
0

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

asked 2020-02-19 14:04:11 +0800

Ng gravatar image

wsl 运行的 centos 7 service 命令提示 Failed to get D-Bus connection: Operation not permitted 错误,无法运行。

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-02-20 10:38:19 +0800

doobom gravatar image

目前的解決辦法是更換一下 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

ref:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-02-19 14:04:11 +0800

Seen: 4,087 times

Last updated: Feb 20