Etch from scratch - LAME
Wednesday 23 May 2007Who would have thought that in choosing “Export As MP3″ from the File menu in Audacity would have instigated such a lot of learning.
In the last two hours I have learnt about another Debian repository to add to my sources.list, authenticating a public key, downloading and compiling a file from source, and some of the history of MP3s and related patents.
Installing Audacity was easy:
apt-get install audacity
I assumed that the creation of MP3s within Audacity was available as the item was available on the File menu, i.e. it was not greyed out or dim.
When I chose “Export As MP3″, I was prompted to provide a filename, then a message was displayed to say that I needed libmp3lame.so. I was then prompted as to whether I wanted to go looking for it in /usr/lib.
I had a scrat around /usr/lib and /usr/local/lib and did not find libmp3lame.so. I went back to the Audacity web site as I remember reading that LAME (Lame Ain’t an MP3 Encoder) would need to be downloaded and installed after Audacity. What I had read referred to the Windows version, but I thought perhaps I would have a go at installing a deb package perhaps called lame.
apt-get install lame
Did not find anything in my apt-get cache. Then I remembered Christian Marillat’s site www.debian-multimedia.org.
I added an appropriate repository from the www.debian-multimedia.org web site to my sources.list file, then:
apt-get update
Then the fun began to figure out what to do with the following error:
W: GPG error: http://mirror.home-dn.net stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 07DC563 D1F41B907
W: You may want to run apt-get update to correct these problems
So off I went back to the www.debian-multimedia.org web site to find the public key. I didn’t scroll right to the bottom of the home page, or look at the FAQ. Remembering that it was Marillat’s site, I decided to ignore the displayed error.
apt-get install lame
The following error was displayed:
WARNING: The following packages cannot be authenticated!
lame
Install these packages without verification [y/N]? N
E: Some packages could not be authenticated
Back to www.debian-multimedia.org web site to find that the public key was at the bottom of the home page, and one of two FAQs
I downloaded the public key and then used
dpkg -i debian-multimedia-keyring_2007.02.14_all.deb
to install the public key.
Re-entered:
apt-get update
and
apt-get install lame
This installed lots of documentation, none of which assisted me to locate what I needed. Unlike, the Windows version, where you simply downloaded a .dll file and showed Audacity where it was.
Googling showed me that I ‘needed’ to download a file from SourceForge and compile from source. Sigh.
Download latest source file from The LAME Project. In my case it was lame-3.97.tar.gz.
Unpack or uncompress using:
tar -xvzf lame-3.97.tar.gz
Navigate to the lame-3.97 directory.
Read the README and INSTALL files. Decide together with H, that most of the configure file consisted of the ’standard’ configure file stuff. Ran:
./configure
I didn’t have the necessary build tools on my computer as I only installed Etch some weeks ago, and I still haven’t got round to installing what people consider ‘essentials’.
apt-get install build-essential
got the necessary tools, or should I say ‘essential’. Re-entered:
./configure
then:
make
Become the root user, then entered:
make install
Checked that I had libmp3lame.so in the /usr/local/lib directory.
Ran Audacity and attempted to ‘Export As MP3′ again. It worked!
Now I just have to watch out for dependency hell, as LAME was not installed using the apt-get package manager.




















Monday 11 June 2007 at 6:47 am
Alternatively, rather than compiling from source, you could just have installed the liblame0 debian package from the multimedia repository.
The following packages are on the debian etch multimedia repo:
- lame
- liblame0
- liblame-dev
- lame-extras
Should be enough to run Audacity. And doesn’t get you into dependency hell when you next dist-upgrade.
In fact, if I were you, I’d carefully remove the stuff you compiled manually, and instead apt-get the package… that way it won’t break when you go to the next version of the distro (although with debian’s glacial release cycle, you’ll probably have a new computer before you do that!)
Daniel
Thursday 14 June 2007 at 5:11 pm
@Daniel
Thank you for your feedback. I have looked again through the steps I took to see where I decided to compile from source. I think it was because apt-get lame appeared to only provide documentation, and perhaps I missed any instructions there were about installing additional packages with apt-get as you have listed.
I certainly will re-visit the issue from where I left off. But first, I’ll get the audio recording that I need to do out of the way. Also, I will need to find out how to as you said “carefully remove the stuff” I compiled and installed manually.
To be honest, I’m not confident about a distro upgrade and have always worked from a fresh install, then apt-get what I need when I need it. Configuration and custom set up can be a bit tedious, for example, setting up email accounts and importing archived mail, but overall I feel that I am starting from scratch with a clean install and can figure out any issues as I install them.
I may play with doing a distro upgrade on the previous system, once I’ve moved fully over to my new Debian Etch system.
Debian’s release cycle is a lot faster than my purchasing new computer cycle. If I don’t count the Sun box which I have had in parallel with three x86 boxes, that is three systems in 17 years
Wednesday 1 August 2007 at 9:23 pm
Thank you so much, that was really helpful
Thursday 2 August 2007 at 8:51 am
You’re welcome Ma’moon.
I have yet to follow through on Daniel’s suggestions, but when I do I’ll be sure to document how I went.
Monday 11 February 2008 at 7:33 am
You can find libmp3lame.so here -> http://monopolize.homelinux.com/wordpress/
Download, unzip and insert library in /usr/local/lib, then, in Audacity, follow the way
Good job