Installing Audacity MP3 export support on Linux

  • October 4, 2007
  • Avatar for peter
    Peter
    Upfold

Audacity icon Audacity is a very good free and open source audio editing application for Windows, Linux and Mac OS X.

Unfortunately, due to patent restrictions, it is unable to import, export and manipulate MP3 files in the default install and this problem is usually present in the Linux version.

It is quite easy however to get the MP3 support up and running however, with a simple install of the LAME MP3 encoder and then providing Audacity with the correct location of the library it needs. Once you have this in place, MP3 support should work across the board.

I'll be showing this process on my Fedora 7 system, using Audacity 1.3.2 beta from the Fedora repositories but it should work with other Audacity installations on Linux (and other Unix-like operating systems too).

If you try and open an MP3 file at the moment, you'll probably be greeted with a message such as this one:

LAME error message

So let's get some LAME. You might be able to get this from your distribution, but that will usually involve enabling custom repositories, so it's often easier to compile yourself.

Head over to the LAME site and download the source code for the latest version (that's 3.97 here). Now it's pretty much a standard compile install.

$ tar xzvf lame-3.97.tar.gz
$ cd lame-3.97
$ ./configure
$ make
$ su -c "make install"

That final step will be sudo make install for Ubuntu and other distributions that use sudo.

Now that we have LAME installed, it should be a simple case of pointing Audacity back in the right direction. Back in Audacity, head to Edit > Preferences.

On the File Formats tab and under the MP3 Export header, click the Find Library button. Provided you installed lame in the default locations and didn't change any options, the library you need should be located at /usr/local/lib/libmp3lame.so.

Choosing this file in the file selector should enable MP3 export (although I did have difficulty importing MP3 files and this may unfortunately involve a recompile of Audacity or finding a third-party package built with MP3 support enabled).

Done!

Avatar for peter Peter Upfold

Home » Articles »