# \[beginner\] How to install an addon?

**URL:** <https://discourse.getcockpit.com/t/beginner-how-to-install-an-addon/2538>\
**Category:** Support\
**Created:** [October 25, 2022, 11:10am UTC](https://discourse.getcockpit.com/t/beginner-how-to-install-an-addon/2538 "2022-10-25T11:10:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![annaswitaj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/annaswitaj/32/1184_2.png) [@annaswitaj](https://discourse.getcockpit.com/u/annaswitaj)\
**Post date:** [October 25, 2022, 11:10am UTC](https://discourse.getcockpit.com/t/beginner-how-to-install-an-addon/2538/1 "2022-10-25T11:10:41Z")

</div>

I added addon LayoutComponents.  
I just did ‘git clone [GitHub - agentejo/LayoutComponents: Manage global layout-builder components - Cockpit addon](https://github.com/agentejo/LayoutComponents.git)’.

What else do I have to do for the addon to work? 😃

I have such an error in the console:

PHP Fatal error: Uncaught Error: Undefined constant “COCKPIT\_API\_REQUEST” in C:\projekty\praca\cockpit-core\addons\LayoutComponents\bootstrap.php:5

![image](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/2X/1/165f96bae1a7e8277b92df54a9f3d4ed227c89fc.png)

I don’t know php and I don’t know how to fix this error. Please help 😃

---

<div class="post-metadata">

**Author:** ![witsec](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/witsec/32/818_2.png) [@witsec](https://discourse.getcockpit.com/u/witsec)\
**Post date:** [October 25, 2022, 11:22am UTC](https://discourse.getcockpit.com/t/beginner-how-to-install-an-addon/2538/2 "2022-10-25T11:22:54Z")

</div>

I think that add-on is written for Cockpit v1 and doesn’t work on v2 :(.

---

<div class="post-metadata">

**Author:** ![annaswitaj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/annaswitaj/32/1184_2.png) [@annaswitaj](https://discourse.getcockpit.com/u/annaswitaj)\
**Post date:** [October 25, 2022, 11:28am UTC](https://discourse.getcockpit.com/t/beginner-how-to-install-an-addon/2538/3 "2022-10-25T11:28:17Z")

</div>

oh 😞 thanks for the answer
