本地Windows10启动WSL的centos7,然后在安装docker-ce之后,启动报错,错误提示如下:
Redirecting to /bin/systemctl start docker.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
顺利解决,截图如下:
[root@xxx xxx]# service docker start
Redirecting to /bin/systemctl start docker.service
/usr/sbin/service: line 87: /bin/systemctl: Success