# Error when installing Elastic Agent on the labs

**URL:** <https://discuss.elastic.co/t/error-when-installing-elastic-agent-on-the-labs/380095>\
**Category:** Elastic Agent\
**Created:** [July 14, 2025, 9:06am UTC](https://discuss.elastic.co/t/error-when-installing-elastic-agent-on-the-labs/380095 "2025-07-14T09:06:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simriti\_Bundhoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simriti_bundhoo/32/144148_2.png) [@Simriti\_Bundhoo](https://discuss.elastic.co/u/Simriti_Bundhoo)\
**Post date:** [July 14, 2025, 9:06am UTC](https://discuss.elastic.co/t/error-when-installing-elastic-agent-on-the-labs/380095/1 "2025-07-14T09:06:59Z")

</div>

While installing Elastic Agent on the Course: Elastic Observability Engineer (On-Demand), Module 2.1, after following the steps properly on the terminal (), I accidentally Ctrl + C and stopped the installation. When I try to reinstall, I am not allowed to do so and I cannot even uninstall the Elastic Agent to re-install the thing. I even tried to create another integration and use another token key but I still get Elastic Agent already installed as error. Any other sudo command asks for password which I do not have. Any help/suggestion?

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [July 14, 2025, 9:28am UTC](https://discuss.elastic.co/t/error-when-installing-elastic-agent-on-the-labs/380095/2 "2025-07-14T09:28:16Z")

</div>

Hello @Simriti_Bundhoo

Welcome to the community.

Please check the path from where you are executing the command. For sudo related question check below post :

> [@What is sudo password in the lab environment](https://discuss.elastic.co/t/what-is-sudo-password-in-the-lab-environment/375035):
>
> Course: Elastic Observability Engineer Version: 2025 Question: In the Lab 2.1 Elastic Agent, Step 8-11 is requested to install the Elastic Agent which requires sudo permissions like this: sudo ./elastic-agent install --url=https://fleet-server:8220 --enrollment-token=.......... As far as I understand Elastic Agent requires root privileges to work properly

Thanks!!

---

<div class="post-metadata">

**Author:** ![Simriti\_Bundhoo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simriti_bundhoo/32/144148_2.png) [@Simriti\_Bundhoo](https://discuss.elastic.co/u/Simriti_Bundhoo)\
**Post date:** [July 18, 2025, 7:01am UTC](https://discuss.elastic.co/t/error-when-installing-elastic-agent-on-the-labs/380095/3 "2025-07-18T07:01:07Z")

</div>

@Tortoise, I had used the commands you linked (as I mentioned in my post), and it wouldn't work because there's a partial installation of the software. Anyways, I have contacted the Elastic Agent Training Team and they proposed renewing the lab for me because the problem I mentioned is quite hard to solve. Anyone who faces the same issue, I suggest doing the same!
