I want to set the shared library path required for ffmpeg operation

Asked 2 years ago, Updated 2 years ago, 135 views

The ffmpeg installation ended successfully, and when I ran the ffmpeg command, I received the following error:

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

I found an article saying that if you run exportLD_LIBRARY_PATH="/usr/local/lib", you will be able to use the command, so I was able to run ffmpeg without any problems.

However, there is a problem and I use Raspberry Pi B+ with ffmpeg, but every time I use Raspi with ssh, it seems that the ffmpeg link is broken and the above error occurs.

It's troublesome to use export every time, so I'd like to go read the file properly, but what should I do?

raspberry-pi ffmpeg

2022-09-30 21:10

2 Answers

echo'exportLD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"'>~/.bashrc

Doing so sets LD_LIBRARY_PATH each time you start bash.


2022-09-30 21:10

Create an empty /etc/ld.so.conf.d/00-ffmpeg.conf file with /usr/local/lib.For more information, see manldconfig.

This way, ~/.bashrc will not get dirty.


2022-09-30 21:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.