JUCE on Ubuntu 18.04 LTE: Unable to locate packages

I am trying to compile a JUCE app on a fresh install of Ubuntu 18.04 LTE. The app is set up with FRUT. I am getting the following error:

CMake Error at 3rdparty/FRUT/cmake/Reprojucer.cmake:5353 (message):
  pkg-config could not find the following packages: alsa x11 xinerama xext
  freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl

However when I then try

sudo apt-get install alsa x11 xinerama xext freetype2 webkit2gtk-4.0 gtk+-x11-3.0 libcurl

…Ubuntu says that some of those packages aren’t there:

Note, selecting 'alsa-base' instead of 'alsa'
Note, selecting 'libwebkit2gtk-4.0-37' for regex 'webkit2gtk-4.0'
Note, selecting 'libwebkit2gtk-4.0-37-gtk2' for regex 'webkit2gtk-4.0'
Note, selecting 'libwebkit2gtk-4.0-dev' for regex 'webkit2gtk-4.0'
Note, selecting 'libwebkit2gtk-4.0-doc' for regex 'webkit2gtk-4.0'
E: Unable to locate package x11
E: Unable to locate package xinerama
E: Unable to locate package xext
E: Unable to locate package freetype2
E: Unable to locate package gtk+-x11-3.0
E: Couldn't find any package by glob 'gtk+-x11-3.0'
E: Couldn't find any package by regex 'gtk+-x11-3.0'
E: Unable to locate package libcurl

What am I doing wrong? What do I need to install to get JUCE and FRUT running on my machine, and how do I do that? I cannot find an up-to-date thread on this here…

Thanks,
Timur

pkg-config works on libraries. apt-get works on packages. Library and package names don’t perfectly match.

  • for alsa, you need libasound2-dev
  • for x11, xinerama, and xext, you need libxcursor-dev, libxinerama-dev, and libxrandr-dev
  • for freetype2, you need libfreetype6-dev
  • for webkit2gtk-4.0, you need libwebkit2gtk-4.0-dev
  • for gtk+-x11-3.0, you need libgtk-3-dev
  • for libcurl, you have the choice between several libcurl3-*-dev and libcurl4-*-dev packages

I hope this helps!

1 Like

Yes, I see there are libcurl4-gnutls-dev, libcurl4-nss-dev, and libcurl4-openssl-dev:
https://packages.ubuntu.com/bionic/libcurl-dev

Apart from being different “flavours”, is there any particular reason to choose one over the other? Is there a recommended one? What’s the difference?

I would go for libcurl4-openssl-dev, since OpenSSL is the default TLS backend for cURL.

This worked perfectly! Thanks @McMartin !

1 Like