1

我想在虚拟服务器上安装 elasticsearch:

  • 大师级容器
  • 乌布努图 16.04

输入时apt-get install elasticsearch,我收到以下错误消息:

Selecting previously unselected package elasticsearch.
(Reading database ... 40410 files and directories currently installed.)
Preparing to unpack .../elasticsearch_5.5.0_all.deb ...
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Unpacking elasticsearch (5.5.0) ...
Processing triggers for systemd (229-4ubuntu17) ...
Setting up elasticsearch (5.5.0) ...
Job for systemd-sysctl.service failed because the control process exited with error code. See "systemctl status systemd-sysctl.service" and "journalctl -xe" for details.
dpkg: error processing package elasticsearch (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu17) ...
Errors were encountered while processing:
 elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)

我也试过用 安装export SKIP_SET_KERNEL_PARAMETERS=true && apt-get install elasticsearch,但我得到了同样的错误信息。

这是输出systemctl status systemd-sysctl.service

● systemd-sysctl.service - Apply Kernel Variables
   Loaded: loaded (/lib/systemd/system/systemd-sysctl.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2017-07-13 19:08:34 CEST; 5min ago
     Docs: man:systemd-sysctl.service(8)
           man:sysctl.d(5)
 Main PID: 21550 (code=exited, status=1/FAILURE)

Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'fs/protected_hardlinks', ignoring: No such file or directory
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Permission denied
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '262144' to 'vm/max_map_count', ignoring: Permission denied
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '176' to 'kernel/sysrq', ignoring: Permission denied
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'fs/protected_symlinks', ignoring: No such file or directory
Jul 13 19:08:34 h2707501.stratoserver.net systemd-sysctl[21550]: Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: No such file or directory

这是(相关的!?)输出journalctl -xe

Jul 13 19:16:18 h2707501.stratoserver.net groupadd[21716]: group added to /etc/group: name=elasticsearch, GID=117
Jul 13 19:16:18 h2707501.stratoserver.net groupadd[21716]: group added to /etc/gshadow: name=elasticsearch
Jul 13 19:16:18 h2707501.stratoserver.net groupadd[21716]: new group: name=elasticsearch, GID=117
Jul 13 19:16:18 h2707501.stratoserver.net useradd[21722]: new user: name=elasticsearch, UID=111, GID=117, home=/home/elasticsearch, shell=/bin/false
Jul 13 19:16:18 h2707501.stratoserver.net usermod[21727]: change user 'elasticsearch' password
Jul 13 19:16:18 h2707501.stratoserver.net chage[21732]: changed password expiry for elasticsearch
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '176' to 'kernel/sysrq', ignoring: Permission denied
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'fs/protected_symlinks', ignoring: No such file or directory
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '262144' to 'vm/max_map_count', ignoring: Permission denied
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: No such file or directory
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'fs/protected_hardlinks', ignoring: No such file or directory
Jul 13 19:16:18 h2707501.stratoserver.net systemd-sysctl[21758]: Couldn't write '1' to 'kernel/kptr_restrict', ignoring: Permission denied

有任何想法吗?提前致谢!

4

1 回答 1

-1

由于未配置dpkg 负责所有类型安装的包,您正面临此问题。

sudo apt-get remove --purge getdeb-repository

它将清除所有存储库数据,您将一切顺利。

于 2017-08-25T19:17:35.580 回答