# Can't setup JUCE for ubuntu 22.04

**URL:** <https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401>\
**Category:** General JUCE discussion\
**Created:** [October 19, 2023, 2:45pm UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401 "2023-10-19T14:45:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dido](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dido](https://forum.juce.com/u/dido)\
**Post date:** [October 19, 2023, 2:45pm UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401/1 "2023-10-19T14:45:43Z")

</div>

I am trying to build my first JUCE project but get linker error when running makefile : "d from …/…/Source/Main.cpp:10:  
…/…/Source/MainComponent.h:10:31: error: ‘juce’ has not been declared  
10 | class MainComponent : public juce::Component  
| ^~~~  
…/…/Source/MainComponent.h:10:37: error: expected ‘{’ before ‘Component’  
10 | class MainComponent : public juce::Component  
| ^ ~~~~~~~~  
…/…/Source/MainComponent.h:12:1: error: expected primary-expression before ‘public’  
12 | public:  
| ^ ~~~~~  
" What I did was to install juce from ubuntu distro : `sudo apt-get install -y juce-tools` . I use gcc 12.3.0 and path to modules seems correct because I check it too before create the project . Also I use projucer for Makefile generation .

---

<div class="post-metadata">

**Author:** ![KottVV](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kottvv/32/14169_2.png) [@KottVV](https://forum.juce.com/u/KottVV)\
**Post date:** [October 19, 2023, 11:45pm UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401/2 "2023-10-19T23:45:26Z")

</div>

not enough information, are you using Projucer, CMake or have made your own Makefile?

---

<div class="post-metadata">

**Author:** ![dido](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dido](https://forum.juce.com/u/dido)\
**Post date:** [October 20, 2023, 4:46am UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401/3 "2023-10-20T04:46:04Z")

</div>

I use Projucer for Makefile generation.

---

<div class="post-metadata">

**Author:** ![nicolasdanet](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nicolasdanet/32/56_2.png) [@nicolasdanet](https://forum.juce.com/u/nicolasdanet)\
**Post date:** [October 20, 2023, 5:17am UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401/4 "2023-10-20T05:17:37Z")

</div>

I didn’t know that debian packages was avalaible. I never tried myself. Official approach is to download from GitHub AFAIK \< [Download - JUCE](https://juce.com/download/) \>. Have you try to install all the packages \< [Debian -- Package Search Results -- juce](https://packages.debian.org/search?searchon=sourcenames&keywords=juce) \>?

---

<div class="post-metadata">

**Author:** ![attila](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/attila/32/11206_2.png) [@attila](https://forum.juce.com/u/attila)\
**Post date:** [October 20, 2023, 7:26am UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401/5 "2023-10-20T07:26:46Z")

</div>

The Linux package isn’t an official distribution, so we can’t vouch for whether or not it works, but issues are reported about it regularly. Because of this it’s quite difficult to get started with it.

The officially supported ways of installing JUCE is either through the mentioned [Download page](https://juce.com/download/) or cloning the Github repo.

---

<div class="post-metadata">

**Author:** ![KottVV](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kottvv/32/14169_2.png) [@KottVV](https://forum.juce.com/u/KottVV)\
**Post date:** [October 20, 2023, 7:30am UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401/6 "2023-10-20T07:30:07Z")

</div>

what version have you installed? also there is **juce-modules-source-data** and **juce-modules-source**

BTW I never tried packaged JUCE in Ubuntu  
maybe it’s worth to try to build using upstream sourcetree?

---

<div class="post-metadata">

**Author:** ![dido](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dido](https://forum.juce.com/u/dido)\
**Post date:** [October 23, 2023, 8:25am UTC](https://forum.juce.com/t/cant-setup-juce-for-ubuntu-22-04/58401/7 "2023-10-23T08:25:05Z")

</div>

Thank you all. I follow the [Download - JUCE](https://juce.com/download/) and now It works.
