# Running Elasticsearch locally in cloned repository \[Ubuntu\]

**URL:** <https://discuss.elastic.co/t/running-elasticsearch-locally-in-cloned-repository-ubuntu/356491>\
**Category:** Elasticsearch\
**Created:** [March 30, 2024, 7:56pm UTC](https://discuss.elastic.co/t/running-elasticsearch-locally-in-cloned-repository-ubuntu/356491 "2024-03-30T19:56:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renato\_Marques](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/renato_marques/32/124209_2.png) [@Renato\_Marques](https://discuss.elastic.co/u/Renato_Marques)\
**Post date:** [March 30, 2024, 7:56pm UTC](https://discuss.elastic.co/t/running-elasticsearch-locally-in-cloned-repository-ubuntu/356491/1 "2024-03-30T19:56:53Z")

</div>

I recently started working on fixing a bug mentioned in the Elasticsearch GitHub repository issues. After installing Elasticsearch and reproducing the bug with the downloaded version from the website, I had an idea of how to solve it. However, I'm facing difficulties running the project locally after cloning it from GitHub.

I began by cloning the repository to my workspace and then attempted to run the command `./gradlew run` in the main directory of the project. Although it took a considerable amount of time for the project to execute, it ultimately failed near the end, preventing me from running Elasticsearch from the repository.

As a newcomer to Elasticsearch, I believe I might not be approaching this in the most efficient manner and could be making some rookie mistakes. I would greatly appreciate any assistance or guidance on this matter, whether it's direct help or pointers to useful tutorials.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 30, 2024, 10:36pm UTC](https://discuss.elastic.co/t/running-elasticsearch-locally-in-cloned-repository-ubuntu/356491/2 "2024-03-30T22:36:29Z")

</div>

I think the best source is probably [elasticsearch/CONTRIBUTING.md at main · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/blob/main/CONTRIBUTING.md) and [elasticsearch/TESTING.asciidoc at main · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/blob/main/TESTING.asciidoc)

---

<div class="post-metadata">

**Author:** ![Renato\_Marques](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/renato_marques/32/124209_2.png) [@Renato\_Marques](https://discuss.elastic.co/u/Renato_Marques)\
**Post date:** [March 31, 2024, 5:04pm UTC](https://discuss.elastic.co/t/running-elasticsearch-locally-in-cloned-repository-ubuntu/356491/3 "2024-03-31T17:04:32Z")

</div>

while, following the simple steps mentioned in the elasticsearch/CONTRIBUTING.md I still couldn't compile the code for some reason i keep getting this error...

> Task :libs:elasticsearch-native:elasticsearch-native-libraries:extractLibs FAILED

FAILURE: Build failed with an exception.

After running with --stacktrace i got a few exceptions like this:

Cause 2: java.io.UncheckedIOException: Could not read workspace metadata from /home/renatolo/.gradle/caches/transforms-4/ab69dbefb0b3497d91e1341374e3735c/metadata.bin

Not sure if Im lacking any software installed or so, but this exceptions are very weird and I am not seeing any way of going arround them

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 31, 2024, 7:15pm UTC](https://discuss.elastic.co/t/running-elasticsearch-locally-in-cloned-repository-ubuntu/356491/4 "2024-03-31T19:15:28Z")

</div>

I think we'd need to see more detail on the exception you're experiencing, these few messages aren't really enough to help. That said, it could be that you're seeing something that has since been fixed, so make sure you're on the latest checkout from `main` and maybe try a `./gradlew clean` and `./gradlew --stop` too.

Also we don't often use `./gradlew run` during development, it's a very slow way to get feedback on any changes you're making. Instead it's more normal to write a test case (or cases) that reproduce(s) the bug and then just run this (or these) tests.

---

<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:** [April 28, 2024, 7:16pm UTC](https://discuss.elastic.co/t/running-elasticsearch-locally-in-cloned-repository-ubuntu/356491/5 "2024-04-28T19:16:26Z")

</div>

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