0

我正在尝试使用 ubuntu 在 linux 的 windows susbsytem 中安装 elasticsearch。它在尝试连接弹性搜索时安装了所需的软件包,它引发了一些错误,例如 . 如何解决这个问题。

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
4

2 回答 2

0

试试看sudo -i service elasticsearch start是否成功。

于 2019-10-14T16:41:49.580 回答
0

使用 'systemctl' 和 'service' 启动服务对于不同的操作系统是不同的,也取决于它们的版本。它基本上基于您使用的 Ubuntu 版本。

对于此问题“系统尚未使用 systemd 作为 init 系统 (PID 1) 启动。无法运行。” :

使用sudo service daemon-reload start代替sudo /bin/systemctl daemon-reload

在上面的命令中用 daemon-reload 替换其他服务。

于 2019-10-16T06:08:42.253 回答