# 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:** 1\
**Showing post:** 2

<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!!

---

_[View the full topic](https://discuss.elastic.co/t/error-when-installing-elastic-agent-on-the-labs/380095)._
