我正在关注这个网站 https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html在我的 Ubuntu 子系统中安装 elasticsearch 以便在 Flask 应用程序中使用。
但是当我尝试执行以下命令时,
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-amd64.deb
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-amd64.deb.sha512
shasum -a 512 -c elasticsearch-7.8.0-amd64.deb.sha512
sudo dpkg -i elasticsearch-7.8.0-amd64.deb
它返回 系统尚未使用 systemd 作为初始系统 (PID 1) 启动。无法运行。无法连接到总线:主机已关闭。
同样,当我关注这个页面时https://phoenixnap.com/kb/install-elasticsearch-ubuntu ,输入sudo systemctl start elasticsearch.service
后返回相同的错误。
我对编程还很陌生,所以我不太了解所有这些错误/警告的含义以及我该如何解决。我四处搜索,发现 systemctl
无法在 Windows Ubuntu 中使用。但是,似乎没有一种解决方案适合我。
我可以就此获得一些建议吗?谢谢!
最佳答案
解决了!使用 sudo service elasticsearch start
将激活 elasticsearch。
关于windows - Elasticsearch 安装问题 : System has not been booted with systemd as init system (PID 1). 无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62742247/