10

I am installing ffmpeg utility, but I am facing libmp3lame >= 3.98.3 not found not found error. I am able to find lame-3.99.5-1.el6.rf.x86_64.rpm and lame-libs-3.98.4-1.el6.nux.x86_64.rpm but installing these are not solving the problem. I am not able to find libmp3lame rpm to install.

Can anyone help me here?

[root@sdp-dev-03:/opt/ffmpeg] # ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --extra-libs=-ldl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid --disable-ffplay --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads

ERROR: libmp3lame >= 3.98.3 not found

If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solve the problem.

Community
  • 1
  • 1
Prasad Revanaki
  • 783
  • 4
  • 10
  • 23
  • Are you following a guide/tutorial? If yes, please provide the link. It appears to be using some text from the FFmpeg Wiki, but there are some differences and useless stuff added. – llogan Mar 11 '16 at 17:22
  • Here is the link http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat – Prasad Revanaki Mar 12 '16 at 06:31

6 Answers6

14

What worked for me was building lame from source. Download lame from here: https://sourceforge.net/projects/lame/files/lame/3.99/, then extract and install:

tar -zxvf lame-3.99.5.tar.gz 
cd lame-3.99.5
./configure
make
sudo make install

Check to see where libmp3lame.a is:

locate libmp3lame.a

Its probably in /usr/local/lib.

Now when you go to configure ffmpeg, try adding that path to the end of your ./configure string. For me it made the difference. e.g.:

--extra-ldflags=-L/usr/local/lib
eculeus
  • 1,230
  • 12
  • 17
  • In case you didn't scroll down and see Wayne's answer, I also had to set the `--extra-cflags` flag to set the include directory when I was compiling LAME and FFMPEG to my home directory. This was on a Ubuntu 16.04 system with LAME 3.100 and FFMPEG 3.4.1. – Wehrdo Jan 07 '18 at 19:10
  • If you're a macports user, use `/opt/local/...` in place of `/usr/local/...` throughout your configure string. – LOlliffe Sep 08 '18 at 06:42
10

For configure troubleshooting see the ffbuild/config.log in the ffmpeg source directory.

In my case it had missing references to libmath functions, even if -lm was set in host_extralibs.

For a quick-fix add -lm to the configure script:

enabled libmp3lame        && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame -lm
aergistal
  • 29,947
  • 5
  • 70
  • 92
6

I just experienced this problem. I had lame v3.99.5 installed, but ffmpeg configure was giving ERROR: libmp3lame >= 3.98.3 not found.

In addition to --extra-ldflags, I had to specify --extra-cflags. So, the configure line was:

./configure [...] --enable-libmp3lame [...] --extra-ldflags=-L/usr/local/lib --extra-cflags=-I/usr/local/include
Phani Kumar M
  • 4,564
  • 1
  • 14
  • 26
Wayne
  • 119
  • 2
  • 6
  • This worked for me thank you. The only catch is that if lame is installed on macos with brew, than the paths might be different. In my case they're `--extra-cflags="-I/opt/homebrew/include" --extra-ldflags="-L/opt/homebrew/lib"` – sarimarton Mar 03 '22 at 19:24
3

On Ubuntu 16.04

sudo apt-get install yasm libmp3lame-dev

Then configure ffmpeg to build from source with libmp3lame:

./configure --enable-gpl --enable-libmp3lame --enable-shared
Brent Faust
  • 9,103
  • 6
  • 53
  • 57
  • 1
    FFmpeg currently supports lame ≥ 3.98.3, so the libmp3lame-dev package should work on all supported Debian and Ubuntu versions as well since they all provide at least 3.99.5. nasm is now preferred over yasm because yasm development seems to have stagnated. – llogan May 13 '18 at 02:29
  • @LordNeckbeard For whatever reason, the other solutions here were not working, but the above did. You say ffmpeg will find and use nasm, if yasm is not installed? – Brent Faust May 15 '18 at 01:34
0

In my case the solution for ffmpeg/3.1.3 (based on https://github.com/Homebrew/legacy-homebrew/issues/44489) was to add:

--host-ldflags=-L/usr/local/lib

to the configure string.

ekad
  • 14,436
  • 26
  • 44
  • 46
0

this is my way:

install X11,and goto ffmpeg path,and code this in the Terminal:

    pkg-config usr/local/lib
    pkg-config usr/lib
    pkg-config usr/X11/lib

then code ./configure xxxx.

Dadep
  • 2,796
  • 5
  • 27
  • 40
Mingo
  • 51
  • 3