ffmpeg: error while loading shared libraries: libavdevice.so.56:

On CentOS 7 I got this error trying to run ffmpeg

ffmpeg: error while loading shared libraries: libavdevice.so.56: cannot open shared object file: No such file or directory

doing ldd $(which ffmpeg) gave me this

[root@titan ~]# ldd $(which ffmpeg)
linux-vdso.so.1 =>  (0x00007fffa2dfe000)
libavdevice.so.56 => not found
libavfilter.so.5 => not found
libavformat.so.56 => not found
libavcodec.so.56 => not found
libpostproc.so.53 => not found
libswresample.so.1 => not found
libswscale.so.3 => not found
libavutil.so.54 => not found
libm.so.6 => /lib64/libm.so.6 (0x00007fb7084e5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb7082c9000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb707f07000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb708805000)

find gave me this

[root@titan ~]# find / -name “libavdevice.so.56*”
/usr/local/lib/libavdevice.so.56.3.100
/usr/local/lib/libavdevice.so.56
[root@titan ~]#

I added

/usr/local/lib/

to the /etc/ld.so.conf

so it now reads

[root@titan ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib/

update with

[root@titan ~]# ldconfig

Now it works fine!

Leave a Reply

Your email address will not be published. Required fields are marked *