# Building Audacity 2.4.2 on Ubuntu 20.04

**URL:** <https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719>\
**Category:** Compiling Audacity\
**Created:** [June 23, 2020, 5:35pm UTC](https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719 "2020-06-23T17:35:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [June 23, 2020, 5:35pm UTC](https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719/1 "2020-06-23T17:35:23Z")

</div>

These steps are specifically for building a release version of Audacity 2.4.2 ([available now](https://forum.audacityteam.org/viewtopic.php?p=398767#p398767)) on Ubuntu 20.04.  
For simplicity, the steps are deliberately kept to a minimum without any additional options.  
  
  
**Prerequisites:**

1. Repository sources (sources.list) must include source code sources.
2. For MP3 / FFmpeg support, “non-free” repositories may need to be enabled.
3. Root access is required for installation (usually via “sudo”).
4. Cmake version 3.15 or later.
5. An Internet connection.  
  
  
**Required dependencies:**  
(The package names below are those used by Ubuntu 20.04 and may be different for other distributions.)

For Debian / Ubuntu based distributions, these packages may be installed from the  
command line with:

```plaintext
sudo apt install <package-name>

```

build-essential  
cmake \>= 3.15  
gcc \>= 4.9  
libgtk2.0-dev  
libasound2-dev  
python3-minimal  
libavformat-dev  
libjack-jackd2-dev

wxWidgets is also required, but see notes below to avoid problems.

To install all in one command:

```plaintext
sudo apt install build-essential cmake gcc libgtk2.0-dev libasound2-dev python3-minimal libavformat-dev libjack-jackd2-dev

```

**WxWidgets:**

Audacity should be built with wxWidgets 3.1 from the Audacity repository. This version  
includes some important backported bug fixes that are not yet available upstream.  
**wxGTK3 should NOT be used for Audacity 2.4.2**

The simplest way to get the required version of wxWidgets is to build it at the same  
time as building Audacity. This requires that git is installed.

```plaintext
sudo apt install git

```

**Getting the Audacity source code:**

Audacity 2.4.2 source code is available from:

> **[Audacity](https://www.fosshub.com/Audacity.html)**
>
> Audacity: Free software download for windows, osx, linux.

**Building Audacity:**

After extracting the downloaded source code, open a terminal window and navigate  
to the root of the source folder (the folder that contains the ‘README.md’ file).

```plaintext
cd <audacity source code>

```

----------- [Update] -----------

There is a bug in the Audacity 2.4.2 source code that causes Audacity to crash when the “Sliding Stretch” effect is applied to stereo tracks. Before building the Audacity source, this bug can be fixed by applying a patch.

Download this patch file: [https://forum.audacityteam.org/uploads/short-url/txnd4ILB9NbINauGuWtL21ZcxBv.patch](https://forum.audacityteam.org/uploads/short-url/txnd4ILB9NbINauGuWtL21ZcxBv.patch) (link updated 25/08/2024)

To apply the patch, put the patch in the root of your source code folder, then apply the patch with:

```plaintext
patch -p 1 < changepitch.patch

```

If you get an error saying that the “patch” command can’t be found, you can install it with

```plaintext
sudo apt install patch

```

Now we can continue to build Audacity.

----------- [End of Update] -----------

```plaintext
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_wxwidgets=local -Daudacity_use_ffmpeg=loaded ..
make

```

Note: On a multi-core system, “make” can be made considerably quicker by adding the “-j” switch. For example, on a 4 core system:

```plaintext
make -j4

```

**Pre-installation test:**

Create a local folder for Audacity’s settings. This folder will be only used for testing and will not be installed.

```plaintext
mkdir "bin/Release/Portable Settings"

```

Then launch Audacity:

```plaintext
cd bin/Release/
./audacity

```

**Installation:**  
Return to the build folder:

```plaintext
cd ../..

```

Then install:

```plaintext
sudo make install

```

**Installing the manual:**

Download the manual from: [Audacity download latest version](https://www.fosshub.com/Audacity.html)

From the directory containing the manual ZIP archive:

```plaintext
sudo unzip audacity-manual-2.4.2.zip -d /usr/local/share/audacity

```

---

<div class="post-metadata">

**Author:** ![LWinterberg](https://forum.audacityteam.org/user_avatar/forum.audacityteam.org/lwinterberg/32/29633_2.png) [@LWinterberg](https://forum.audacityteam.org/u/LWinterberg)\
**Post date:** [April 28, 2023, 9:30am UTC](https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719/2 "2023-04-28T09:30:03Z")

</div>

Unpinned on April 28, 2023, 9:30am UTC


