On a Ubuntu 14.04 system we had installed elasticsearch 2.3.4.
The system was upgraded to 16.04
An apt-get update & upgrade tried to upgrade to elasticsearch 2.4.4.
But, we're now getting this error:
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)
I have tried:
apt-get install -fdpkg: 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 -ano outputapt-get install --reinstall elasticsearchPreparing 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 elasticsearchdpkg: 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: elasticsearchdpkg --remove --force-all elasticsearchelasticsearch 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: elasticsearchdpkg --purge elasticsearchdpkg: 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
I've even tried switching back from systemd to upstart-sysv, but after a reboot nothing has changed.
Any ideas would be welcome.