What does this error mean?
A shared library is a file of ready-made code that many programs borrow. FFmpeg needs one called libavdevice. The number 54 is its version. The error says FFmpeg wants version 54, but the server cannot find it.
This usually happens when FFmpeg was built for one version of its libraries, and a different version is installed now. It can also happen when the libraries sit in a folder the system does not search.
You need root access for this guide. Root is the main administrator login of the server.
Steps
- Connect to your server with SSH.
- See which libraries FFmpeg is missing.
This lists each library that cannot be found.ldd $(which ffmpeg) | grep "not found" - Look for the file on the disk.
This searches the server for files with that name.find / -name "libavdevice*" 2>/dev/null - If you find the file in a folder such as
/usr/local/lib, tell the system to look there. Open the file/etc/ld.so.confand check it has a line likeinclude ld.so.conf.d/*.conf. Then create a small file.
This adds the folder to the search list.echo "/usr/local/lib" > /etc/ld.so.conf.d/ffmpeg.conf - Refresh the library list.
This rebuilds the list of known libraries.ldconfig - Test FFmpeg again.
ffmpeg -version
If the file is not found at all
The library is missing or has a different version. The cleanest fix is to reinstall FFmpeg with its libraries, so they match.
dnf reinstall ffmpeg ffmpeg-libs
On older systems use yum. On Ubuntu or Debian, use apt install --reinstall ffmpeg.
Quick recap
- The error means FFmpeg cannot find the library file it wants.
- Use
lddto see what is missing. - Add the library folder to the search list and run
ldconfig. - If still missing, reinstall FFmpeg so all parts match.