[FFmpeg-user] [Fedora] Installing from source

matt clark liquefry at gmail.com
Tue Feb 16 23:16:23 CET 2016


OK lots of responses, hopefully I can clear up any confusion.  Here's some
more details to explain the error:

I followed every step on the wiki (
https://trac.ffmpeg.org/wiki/CompilationGuide/Centos) instructions exactly
(ie ran every command including all the prerequisites and the optional
encoders as listed).  Everything ran without error until this command which
is part of the final ffmpeg build step:

PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure
--prefix="$HOME/ffmpeg_build"
--extra-cflags="-I$HOME/ffmpeg_build/include"
--extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin"
--pkg-config-flags="--static" --enable-gpl --enable-nonfree
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265

I got the following error:
      Error: freetype2 not found

I had installed the prerequisites mentioned in the wiki already, which
include freetype-devel and zlib-devel.  Running
      locate freetype

told me that the freetype files were in my /usr/include directory, and
after some googling I came across the ln -s solution linked above that had
solved someone else's problem.  However I was still getting the freetype2
not found error after running the config command so this fix didnt really
do anything useful.  I mentioned it originally for completeness in case it
had done something in conjunction with the next fix.

Anyway I then decided to look at the config.log file.  Unfortunately I
can't attach it, the file has now been deleted since I have successfully
run the next few commands in the wiki including "make distclean".  But I
have noted the error that the config.log file said configure was crashing
out on.
  /usr/bin/ld: cannot find -lbz2
  collect2: error: ld returned 1 exit status

So I figured that I needed to find the lbz2 library in order to compile the
program with options as per the wiki. I already had bzip2 installed,
bzip2-devel gave me the right library so I installed that too.  Once I'd
installed that program using yum, ffmpeg compiled properly and is now
working fine.

So my conclusion, which may be wrong, was that in order to install ffmpeg
on Fedora 21 as described in the wiki, you need bzip2-devel on your
system.  Or another package that gives libbz2 I guess (maybe bzip2-libs).
Since the wiki was written for CentOS I thought I should report this in
case anyone else hits the same error. I don't know whether there is any
link between freetype2 and -lbz2, but I can report that installing
bzip2-devel definitely fixed my problem!

To clarify one question: in my original message, I was not suggesting that
bzip2-devel is a requirement for freetype2, but that it is a missing
dependency for ffmpeg if you want to install it as per the wiki
instructions.

Matt


More information about the ffmpeg-user mailing list