解决wsl出现Failed to get D-Bus connection的问题

运行命令

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

如果出现connection refused需要在hosts中添加raw.githubusercontent.com的真实ip

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐