Dependencies to Compile Audacity on Ubuntu
Compiling Audacity from source on Ubuntu requires a collection of core build tools, graphical toolkit libraries, and audio processing packages to complete the configuration and build process successfully. This guide provides a clear, categorized breakdown of every dependency that must be pre-installed via the Ubuntu package manager before running CMake to build the software.
1. Essential Build Tools
Before configuring Audacity, your system must have the standard C/C++ compilation toolchain, version control, and build automation software installed:
- build-essential: Installs GCC, G++,
make, and standard C runtime libraries. - cmake: Required build system generator (Audacity requires CMake 3.16 or newer).
- git: Needed to clone the Audacity repository and retrieve submodules.
- python3 and python3-pip: Used by build scripts and the Conan package manager (if compiling with Conan-managed dependencies).
- pkg-config: Helps the build system find installed libraries on the system.
2. Graphical Toolkit and Desktop Libraries
Audacity uses wxWidgets with a GTK+ 3 backend for its graphical interface, as well as desktop integration libraries:
- libwxgtk3.2-dev (or libwxgtk3.0-gtk3-dev on older Ubuntu releases): The wxWidgets development libraries.
- libgtk-3-dev: The GTK+ 3 development headers and libraries.
- libglib2.0-dev: Core application building blocks for GTK.
3. Audio System and Driver Interfaces
To interact with Linux audio subsystems, you must install the development packages for ALSA and JACK:
- libasound2-dev: Advanced Linux Sound Architecture (ALSA) development files.
- libjack-jackd2-dev: JACK Audio Connection Kit development files for low-latency audio support.
4. Audio Formats and Processing Libraries
Audacity relies on specialized libraries to decode, encode, and manipulate various audio formats:
- libsndfile1-dev: Essential library for reading and writing sampled sound files.
- libsoxr-dev: High-quality audio resampler library.
- libflac-dev: Free Lossless Audio Codec library.
- libogg-dev and libvorbis-dev: Ogg Vorbis compressed audio libraries.
- libmpg123-dev: Fast MPEG Audio Layer 1, 2, and 3 decoding library.
- libid3tag0-dev: ID3 tag reading library.
- libsoundtouch-dev: Audio tempo and pitch modification library.
- libvamp-hostsdk3v5: Vamp audio analysis plugin SDK.
- libtwolame-dev: MPEG Audio Layer 2 encoder.
Complete Installation Command
You can install the entire set of required build tools and libraries on modern Ubuntu releases by running the following command in the terminal:
sudo apt update
sudo apt install -y \
build-essential \
cmake \
git \
pkg-config \
python3 \
python3-pip \
libwxgtk3.2-dev \
libgtk-3-dev \
libglib2.0-dev \
libasound2-dev \
libjack-jackd2-dev \
libsndfile1-dev \
libsoxr-dev \
libflac-dev \
libogg-dev \
libvorbis-dev \
libmpg123-dev \
libid3tag0-dev \
libsoundtouch-dev \
libtwolame-devOnce these packages are installed, your Ubuntu system will be prepared to clone the Audacity repository and proceed with CMake configuration and compilation.