Home > database >  Elasticsearch | Java version problem during installing Elasticsearch
Elasticsearch | Java version problem during installing Elasticsearch

Time:12-18

My machine runs Manjaro.

I cloned https://aur.archlinux.org/elasticsearch.git then ran: makepkg -si

my current Java version is: 19 according to: java --version:

openjdk 19.0.1 2022-10-18 OpenJDK Runtime Environment (build 19.0.1 10) OpenJDK 64-Bit Server VM (build 19.0.1 10, mixed mode)

While running makepkg -si I get the following error though:

What went wrong: A problem occurred evaluating project ':build-tools-internal'. Java 17 is required to build Elasticsearch but current Java is version 11.

I also installed java 17 by:

sudo pacman -S jre17-openjdk-headless jre17-openjdk jdk17-openjdk openjdk17-doc openjdk17-src

Still getting the same error. Any idea?

CodePudding user response:

You have another version of Java installed, that Elastic is locating when it starts, as indicated by the error message you're getting about version 11. This happens commonly when you've been upgrading Java over time and have older versions still lurking about.

  • Related