Failed installing elasticsearch

(Patrick Doyle) #1

I am following the guide here on a brand new ubuntu 18.04 AWS EC2 instance.

I ran the following commands:

wget -qO - | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update
sudo apt-get install elasticsearch

And receive the following error:

dpkg: error processing archive /var/cache/apt/archives/elasticsearch_6.4.2_all.deb (--unpack):
 new elasticsearch package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any ideas?

(Alexander Reelsen) #2

Have you installed java first? Check for JAVA_HOME environment variable and/or run java -version.


Make sure you install java 8.
hope this helps you,

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.