System has not been booted with systemd as init system (PID 1). Can't operate

岁酱吖の 提交于 2019-11-30 11:18:34

问题


I'm trying to follow the Redis installation process as discuss in this article of digital occean, in WSL. The Ubuntu version installed is Ubuntu 18.04.

Everything in redis installation is fine but when I tried to run this sudo systemctl start redis I got this message.

System has not been booted with systemd as init system (PID 1). Can't operate.

Any Idea on what should I do with that?


回答1:


Instead, use: sudo service redis-server start

I had the same problem, stopping/starting other services from within Ubuntu on WSL. This worked, where systemctl did not.

And one could reasonably wonder, "how would you know that the service name was 'redis-server'?" You can see them using service --status-all



来源:https://stackoverflow.com/questions/52197246/system-has-not-been-booted-with-systemd-as-init-system-pid-1-cant-operate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!