我正在尝试使用ubuntu在linux的windows susbsytem中安装elasticsearch。它在尝试连接elastic search时安装了所需的软件包,但抛出了一些错误,如。如何解决此问题。
venkat@DESKTOP-4KU4062:~$ sudo /bin/systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate.
venkat@DESKTOP-4KU4062:~$ sudo /bin/systemctl enable elasticsearch.service
Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable elasticsearch
venkat@DESKTOP-4KU4062:~$ sudo /bin/systemctl start elasticsearch.service
System has not been booted with systemd as init system (PID 1). Can't operate.
venkat@DESKTOP-4KU4062:~$ sudo /bin/systemctl start elasticsearch.service
System has not been booted with systemd as init system (PID 1). Can't operate.
venkat@DESKTOP-4KU4062:~$ curl 127.0.0.1:9200
curl: (7) Failed to connect to 127.0.0.1 port 9200: Connection refused发布于 2019-10-15 00:41:50
尝试sudo -i service elasticsearch start,看看是否成功。
发布于 2019-10-16 14:08:42
使用“systemctl”和“service”启动服务对于不同的操作系统是不同的,也取决于它们的版本。它基本上是基于你正在使用的Ubuntu版本。
对于此问题“系统尚未以init system (PID 1)的身份使用systemd启动。无法操作。”:
用sudo service daemon-reload start代替sudo /bin/systemctl daemon-reload
用上述命令中的daemon-reload替换其他服务。
https://stackoverflow.com/questions/58375421
复制相似问题