解决wsl下linux子系统 centos不能运行 service systemctl问题
2020-12-01 10:40:06    163    0    0
admin

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
  • 1

查了一下,意思就是 wsl 并不支持。不过 github 上有人解决了这个问题, 这里
大概就是这样:使用Python脚本替换了systemctl 传送门

mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://github.com/gdraheim/docker-systemctl-replacement/blob/master/files/docker/systemctl.py > /usr/bin/systemctl
chmod +x /usr/bin/systemctl​

上一篇: 安装QConf 报错及解决方案

下一篇: windows 10 WSL 安装 Centos

163
登录 后评论.
没有帐号? 现在注册.
0 评论
Table of content