Skip navigation

After installing OpenCV 2.2 and FFMpeg 7.1 on Ubuntu 11.04, I wasn’t able to run FFMpeg because of linker issues. Turns out the problem was my system wasn’t aware of /usr/local/lib which is where the built libraries got placed. So I ended up getting errors like:

ffmpeg: relocation error: /usr/local/lib/libavfilter.so.1: symbol av_expr_free, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference

You can do something fairly easy which might fix it:

$ export LD_LIBRARY_PATH=/usr/local/lib

Or you can do this:

There’s a file in /etc called ld.so.conf. This contains a path to a directory which contains all the ld conf files. In that directory there should be one called libc.conf. Put the line /usr/local/lib in there (or if it already is), then run:

$ sudo ldconfig -v

This reloads the ld cache. If the file IS NOT there, then you can create one called /etc/ld.so.conf.d/ffmpeg.conf and add the line, then rerun sudo ldconfig -v. This should point ffmpeg to the proper files.

2 Comments

  1. Thank you very much for your solution!
    It has helped me a lot today with FFmpeg compilation and installation :-)

  2. Hello,

    THanks…It helps!!

    Betty


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.