gpt4 book ai didi

python - Elasticsearch 在对系统进行任何操作时出错?

转载 作者:太空宇宙 更新时间:2023-11-04 09:57:43 24 4
gpt4 key购买 nike

我已经安装了 Elasticsearch,现在由于我工作场所的其他人所做的一些更改,在更新、安装新包等任何操作期​​间不断弹出一些错误,而且 elasticsearch 无法正常工作。

附上安装新包的错误日志。

$ sudo apt-get install bash-completion

Reading package lists... Done
Building dependency tree
Reading state information... Done
bash-completion is already the newest version (1:2.1-4.2ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)

我什至从网上尝试了不同的解决方案,比如尝试从系统中完全删除 elasticsearch。

我遵循的步骤。

sudo rm -rf/var/lib/elasticsearchsudo rm -rf/etc/elasticsearchsudo apt-get install -f

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt-get --purge autoremove elasticsearch

$ sudo apt-get --purge autoremove elasticsearch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
elasticsearch*
0 upgraded, 0 newly installed, 1 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 37.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 329402 files and directories currently installed.)
Removing elasticsearch (5.5.0) ...
Stopping elasticsearch service...Failed to stop elasticsearch.service: Unknown unit: elasticsearch.service
See system logs and 'systemctl status elasticsearch.service' for details.
Failed to get load state of elasticsearch.service: No such property 'LoadState'
dpkg: error processing package elasticsearch (--purge):
subprocess installed pre-removal script returned error exit status 1
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)

我重新启动了系统,但错误不断出现。

有人对如何解决这个问题有建议吗?

这个命令也没有给出任何内容

$ systemctl status systemd-sysctl.service
Failed to get properties: No such interface ''

最佳答案

此安装中的 systemd 是您的初始化服务吗?还有这是什么linux发行版?您的发行版是哪个版本?我目前认为您可能没有使用 systemd,但 elasticsearch 包以某种方式假设了这一点。

如果您在 elasticsearch repository 中打开错误报告,我将不胜感激有了以上所有信息,这保证了对 ES 方面的更多研究(免责声明:我是一名 ES 开发人员,并且热衷于解决这个问题 :-)。

此外:您可以尝试通过运行 dpkg -P elasticsearch 完全删除 elasticsearch 包。

此外,您可以尝试将 set -x 添加到 /var/lib/dpkg/info/elasticsearch.postinst 并运行 sh/var/lib/dpkg/info/elasticsearch.postinst 配置 获得更多的调试输出

关于python - Elasticsearch 在对系统进行任何操作时出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45141383/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com