# Error cannot execute binary file when trying to run elasticsearch after installation

**URL:** <https://discuss.elastic.co/t/error-cannot-execute-binary-file-when-trying-to-run-elasticsearch-after-installation/210934>\
**Category:** Elasticsearch\
**Created:** [December 6, 2019, 7:15pm UTC](https://discuss.elastic.co/t/error-cannot-execute-binary-file-when-trying-to-run-elasticsearch-after-installation/210934 "2019-12-06T19:15:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrisRus](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@CrisRus](https://discuss.elastic.co/u/CrisRus)\
**Post date:** [December 6, 2019, 7:15pm UTC](https://discuss.elastic.co/t/error-cannot-execute-binary-file-when-trying-to-run-elasticsearch-after-installation/210934/1 "2019-12-06T19:15:43Z")

</div>

Hello,  
when trying to install Elasticsearch 7.5, I get the following error mentioned in the subject  
I have just followed the instructions here:  
[https://www.elastic.co/guide/en/elastic-stack-get-started/7.5/get-started-elastic-stack.html#linux](https://www.elastic.co/guide/en/elastic-stack-get-started/7.5/get-started-elastic-stack.html#linux)

So, I run the following commands

- curl -L -O [https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.0-linux-x86\_64.tar.gz](https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.0-linux-x86_64.tar.gz) - No problem
- tar -xzvf elasticsearch-7.5.0-linux-x86\_64.tar.gz - No problem
- cd elasticsearch-7.5.0 - No problem
- ./bin/elasticsearch - I get the following error: ./bin/elasticsearch-env: line 71: /elasticsearch-7.5.0/jdk/bin/java: cannot execute binary file: Exec format error

I don't understand because I have openjdk version "1.8.0\_03-Ubuntu that seems to be compatible and also Ubuntu 16.04.3 LTS with Kernel Linux 4.10.0-28-generic and x86 as Architecture. All those seem to be compatible according to Support Matrix web page ( [https://www.elastic.co/es/support/matrix#matrix\_jvm](https://www.elastic.co/es/support/matrix#matrix_jvm) )

Could someone give a tip about what is happening?

Thanks and regards,

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 9, 2019, 1:54pm UTC](https://discuss.elastic.co/t/error-cannot-execute-binary-file-when-trying-to-run-elasticsearch-after-installation/210934/2 "2019-12-09T13:54:26Z")

</div>

It seems, that the java bundled with Elasticsearch cannot be executed. Can you try to set `JAVA_HOME` environment variable to your openjdk installation?

Apart from that, is this any special hardware architecture, where Elasticsearch is running on?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 6, 2020, 1:54pm UTC](https://discuss.elastic.co/t/error-cannot-execute-binary-file-when-trying-to-run-elasticsearch-after-installation/210934/3 "2020-01-06T13:54:29Z")

</div>

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