I am trying to install Elasticsearch 7.3.1 using Ubuntu's APT, but seeing the following issues:
Reading package lists... Done
Building dependency tree
Reading state information... Done
elasticsearch is already the newest version (7.3.1).
0 upgraded, 0 newly installed, 0 to remove and 0 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]
Setting up elasticsearch (7.3.1) ...
/usr/share/elasticsearch/bin/elasticsearch-env: line 73: /etc/default/elasticsearch: No such file or directory
dpkg: error processing package elasticsearch (--configure):
installed elasticsearch package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
I already have Java installed, but JAVA_HOME is not set.
There is no var/log/elasticsearch logs so can't really narrow it down. Shouldn't the script already create the /etc/default/elasticsearch file?
Thanks