2017-07-17 4 views
1

私はElasticsearchをインストールしましたが、私の職場で他の人が行った変更のために、アップデートなどの操作中にいくつかのエラーがポップアップし続け、新しいパッケージをインストールし、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に/ elasticsearch のsudoのrm -rfは/ etc/elasticsearch 須藤はapt-getを

$ 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) 

須藤はapt-getを--purge自動的削除elasticsearch

-fインストール
$ 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 '' 

答えて

2

を与えないが、このインストールでは、あなたのinitサービスをsystemdにされますか?また、どのようなLinuxディストリビューションですか?どのバージョンのディストリビューションですか?私は現在あなたがsystemdを使用していないかもしれないと考えていますが、elasticsearchパッケージはこれを何とか仮定しています。

elasticsearch repositoryのバグレポートを上記の情報とともに公開すると非常に感謝します。これは、ESに関するより多くの研究を保証するものです(免責事項:私はES開発者であり、 - )。

また、dpkg -P elasticsearchを実行してelasticsearchパッケージを完全に削除できます。

そして加えて、あなたは/var/lib/dpkg/info/elasticsearch.postinstset -xを追加しようと多くのデバッグ出力

2

を取得するためにsh /var/lib/dpkg/info/elasticsearch.postinst configure を実行することができます私はかなり同じ問題を抱えていました。 これは、弾性検索ではなく、systemctlとはあまり関係しません。 まず、あなたがそれを使用しているかどうかを判断する必要があります。私の場合は

[[ `systemctl` =~ -\.mount ]] && echo yes || echo no 

、答えはあなたがそれを有効にする必要がありますので、「なし」

ませんでした。

+0

私のための弾性をインストールするための最良のチュートリアルはこちらです。https://www.howtoforge.com/tutorial/how-to-install-elastic-stack-on-ubuntu-16-04/ –

関連する問題