wsl centos7: Failed to get D-Bus connection Operation not permitted
即然是 CentOS 那如果不能运行 service systemctl 那不是等于是残了嘛.
在Windows下能安装linux子系统 CentOS 7 感觉挺好的, 心里暗爽, 然就开始折腾了.
安装 PostgreSQL 配置完了以后就准备 service postgresql start 的时候就提示了错误:
Failed to get D-Bus connection Operation not permitted
查了一下,意思就是 wsl 并不支持。不过 github 上有人解决了这个问题, 这里
大概就是这样:使用Python脚本替换了systemctl 传送门
mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://raw