首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu14.04清除ElasticSeach

Ubuntu14.04清除ElasticSeach
EN

Ask Ubuntu用户
提问于 2019-02-22 19:39:20
回答 1查看 513关注 0票数 0

我在Ubuntu14.04上安装了elasticsearch 6.6.1,但遇到了一些困难。我希望完全卸载elasticsearch并安装一个旧版本。当我跑的时候

代码语言:javascript
复制
sudo apt-get --purge autoremove elasticsearch

弹出一条错误消息:

代码语言:javascript
复制
Removing elasticsearch (6.6.1) ...
Stopping elasticsearch service...Failed to issue method call: Unit elasticsearch.service not loaded.
dpkg: error processing package elasticsearch (--remove):
 subprocess installed pre-removal script returned error exit status 5
Failed to issue method call: Unit systemd-sysctl.service failed to load: No such file or directory. See system logs and 'systemctl status systemd-sysctl.service' for details.
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service
chown: cannot access ‘/var/lib/elasticsearch’: No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 elasticsearch

我不确定elasticseach.service,因为我认为我没有那个文件。我也已经用了

代码语言:javascript
复制
sudo rm -rf /var/lib/elasticsearch/
sudo rm -rf /etc/elasticsearch

我试图重新安装elasticsearch,然后使用卸载,但是使用apt-get产生了类似的错误:

代码语言:javascript
复制
Setting up elasticsearch (6.6.1) ...
Failed to issue method call: Unit systemd-sysctl.service failed to load: No such file or directory. See system logs and 'systemctl status systemd-sysctl.service' for details.
chown: cannot access ‘/var/lib/elasticsearch’: No such file or directory
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)

在我意识到我应该使用apt-get来删除elasticsearch之前,我不确定我是不是搞砸了。任何帮助都是非常感谢的!

EN

回答 1

Ask Ubuntu用户

发布于 2019-03-01 14:59:19

我跟踪错误信息进入了一个兔子洞,但最终我用

代码语言:javascript
复制
ls -l /var/lib/dpkg/info | grep -I elasticsearch

然后删除那些文件。这解决了持续出现的dpkg错误1。在使用sudo apt-get update之后,elasticsearch似乎不再在服务器上了。

这是在这里发布的最后一个解决方案https://itsfoss.com/dpkg-returned-an-error-code-1/,如果您在卸载时遇到类似的错误,您可以先尝试其他解决方案。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1120463

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档