склонный - получают ошибку: “SysV: не найденный”

В системе Ubuntu 14.04 мы установили elasticsearch 2.3.4.

Система была обновлена до 16,04

apt-get update & upgrade попробованный для обновления до elasticsearch 2.4.4.

Но, мы теперь получаем эту ошибку:

Preparing to unpack .../elasticsearch_2.4.4_all.deb ...
/var/lib/dpkg/tmp.ci/preinst: 43: /etc/default/elasticsearch: SysV: not found
dpkg: error processing archive /var/cache/apt/archives/elasticsearch_2.4.4_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 127
/var/lib/dpkg/tmp.ci/postrm: 43: /etc/default/elasticsearch: SysV: not found
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 127
...
Errors were encountered while processing:
 /var/cache/apt/archives/elasticsearch_2.4.4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я попробовал:

  • apt-get install -f

    dpkg: error processing package elasticsearch (--configure):
     package elasticsearch is not ready for configuration
     cannot configure (current status 'half-installed')
    Processing triggers for libc-bin (2.23-0ubuntu5) ...
    Errors were encountered while processing:
     elasticsearch
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
  • dpkg --configure -a

    no output
    
  • apt-get install --reinstall elasticsearch

    Preparing to unpack .../elasticsearch_2.4.4_all.deb ...
    /var/lib/dpkg/tmp.ci/preinst: 43: /etc/default/elasticsearch: SysV: not found
    dpkg: error processing archive /var/cache/apt/archives/elasticsearch_2.4.4_all.deb (--unpack):
     subprocess new pre-installation script returned error exit status 127
    /var/lib/dpkg/tmp.ci/postrm: 43: /etc/default/elasticsearch: SysV: not found
    dpkg: error while cleaning up:
     subprocess new post-removal script returned error exit status 127
    Errors were encountered while processing:
     /var/cache/apt/archives/elasticsearch_2.4.4_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
  • dpkg --remove --force-remove-reinstreq elasticsearch

    dpkg: warning: overriding problem because --force enabled:
    dpkg: warning: package is in a very bad inconsistent state; you should
     reinstall it before attempting a removal
    (Reading database ... 157552 files and directories currently installed.)
    Removing elasticsearch (2.3.4) ...
    /var/lib/dpkg/info/elasticsearch.postrm: 43: /etc/default/elasticsearch: SysV: not found
    dpkg: error processing package elasticsearch (--remove):
     subprocess installed post-removal script returned error exit status 127
    Errors were encountered while processing:
     elasticsearch
    
  • dpkg --remove --force-all elasticsearch

    elasticsearch
    dpkg: warning: overriding problem because --force enabled:
    dpkg: warning: package is in a very bad inconsistent state; you should
     reinstall it before attempting a removal
    (Reading database ... 157552 files and directories currently installed.)
    Removing elasticsearch (2.3.4) ...
    /var/lib/dpkg/info/elasticsearch.postrm: 43: /etc/default/elasticsearch: SysV: not found
    dpkg: error processing package elasticsearch (--remove):
     subprocess installed post-removal script returned error exit status 127
    Errors were encountered while processing:
     elasticsearch
    
  • dpkg --purge elasticsearch

    dpkg: error processing package elasticsearch (--purge):
     package is in a very bad inconsistent state; you should
     reinstall it before attempting a removal
    Errors were encountered while processing:
     elasticsearch
    

Я даже попытался переключиться назад от systemd до выскочки-sysv, но после перезагрузки ничто не изменилось.

Любые идеи приветствовались бы.

2
задан 26 January 2017 в 01:08

1 ответ

В/etc/default/elasticsearch существует раздел

SysV init.d
# When executing the init script, this user will be used to run the elasticsearch service.
# The default value is 'elasticsearch' and is declared in the init.d file.
# Note that this setting is only used by the init script. If changed, make sure that
# the configured user can read and write into the data, work, plugins and log directories.
# For systemd service, the user is usually configured in file /usr/lib  /systemd/system/elasticsearch.service
ES_USER=elasticsearch
ES_GROUP=elasticsearch

, я прокомментировал весь раздел.

установка затем смогла продолжиться.

Это на самом деле предложило мне с "Версией специалиста по обслуживанию пакета установки / Сохраняют версию системы" вопросом, который в разности показал, что намерение установки состоит в том, чтобы прокомментировать тот раздел так или иначе.

1
ответ дан 2 December 2019 в 04:50

Другие вопросы по тегам:

Похожие вопросы: