I want to use ffmpeg and libmp3lame on a stable Debian box. Alas, Debian does not support the libmp3lame package. So, I downloaded the sources for ffmpeg and the lame encoder, configured and installed them manually (on a testing machine).

But I do not want to install ffmpeg and libmp3lame on the machine for all users (also because the built is not stable). I only want to use it for a single project with a single user.

When I run ./ffmpeg/ffmpeg I get following error message:

# cd ffmpeg
# ./configure --enable-libmp3lame
# make
# ./ffmpeg
./ffmpeg: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory.

So I simply tried to link the required library to the local directory:

# ln -s ../lame-3.99.5/libmp3lame/libmp3lame.so ./libmp3lame.so.0

But "./" seems to be not in the shared library search path so ffmpeg doesn't find it.

I tried following bash script:


But it still does not work.

I do not want to install the library as root (e.g. into /usr/lib) because I do not want to install anything without the official package manager + trusted Debian package sources.

So is there any way to tell ffmpeg to use the libmp3lame.so.0 in the "./" directory so I can use it without installing?

migrated from serverfault.com Jul 13 '12 at 3:47

This question came from our site for system and network administrators.

  • Have you tried setting LD_LIBRARY_PATH=/home/username/lame-3.99.5/libmp3lame/? – mgorven Jul 13 '12 at 3:05
  • Yes, I have tried it now. It did not solve the problem :-/ – Daniel Marschall Jul 13 '12 at 3:14

There is a debian multimedia repository, which has many of the 'unsupported' multimedia applications and libraries.

For your /etc/apt/sources.list (better to put in a file in /etc/apt/sources.list.d)

deb http://www.deb-multimedia.org/ testing main non-free
deb-src http://www.deb-multimedia.org/ testing main non-free

Works well for me, check out the website (same address) for details on different debian versions.

I added those lines, plus some explanatory comments into a file, saved into /etc/apt/sources.list.d/multimedia.list, works very well. There are restrictions on what the file can be named, see sources.list (5) for more details.

  • Thanks for that hint. I already tried deb-multimedia.org at my testing machine. But I have 2 problems with it. (1) I did not find any GPG key which I could add to the trust chain, so aptitude did always bug me with a security alert when I wanted to install something. And (2) I am not sure if I should trust this repository since the server is a public webserver and should only contain stable software. I feel a bit uncomfortable with installing an "untrusted" repository to the package manager. (Or maybe I am just a bit paranoid ;-) ) – Daniel Marschall Jul 13 '12 at 4:06
  • From the front page of the website: The first package to install is deb-multimedia-keyring. Since Squeeze you can install this package with apt-get but you need to presse Y when the package ask what to do and do not just press return. I've been using it for quite a while, always been stable releases. Public Webserver? He owns the domain... An new “apt-get update” is also necessary. – lornix Jul 13 '12 at 4:09
  • Oh, I haven't noticed the hint with the "deb-multimedia-keyring" package. I was thinking you have to enter the fingerprint manually with dpkg. Ok, problem #1 solved ;-) With "public webserver" I meant my box. Since I want to use ffmpeg on a webserver (as conversation tool) I want to be on the safe side and only install stable releases from official sources. And for my scenario it would be OK if I just have a self-compiled built running in the user's directory (... if ffmpeg could just find the library) – Daniel Marschall Jul 13 '12 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.