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

在WSL(Windows Subsystem for Linux,适用于Linux的Windows子系统)下通过systemctl命令启动某些服务将造成System has not been booted with systemd as init system (PID 1). Can't operate.这样的错误;

以启动Nginx为例:

systemctl start nginx
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
wsl启动服务错误

解决方法

尝试使用以下方法启动服务:

service nginx start

原创内容,如需转载,请注明出处;

本文地址: https://www.perfcode.com/p/system-has-not-been-booted-with-systemd-as-init-system.html

分类: 计算机技术
推荐阅读:
Kali系统和虚拟机镜像的默认账号密码 通常,Kali的默认账号密码为 root/toor,但虚拟机镜像默认的账号密码却不一样,通常为 kali/kali;
Windows安装Golang最新版本 首先,你需要下载Golang的最新安装包,你可以到官网去,Golang的官方网站为:golang.org,但这个网站国内用户无法访问,好在Google提供了第二个Golang下载页面:
Python使用webbrowser模块来实现弹出一个网页 如果你希望在别人运行你的程序时弹出一个指向自己网站的页面,你可以通过以下代码来实现:
Python property()函数 property()函数是Python内置函数之一,用于创建属性。
Pythone内置函数 Python 内置函数是 Python 解释器提供的函数库,这些函数可以直接使用,无需导入任何模块。
Python tuple元组 tuple(元组)类似于列表,但元组当中的项不能被修改。