How to load correct libavcodec.so shared library v

2019-01-29 03:27发布

问题:

I am using libavcodec and libavformat in my project but when I execute a binary which was built on another machine, I get the following error:

error while loading shared libraries: libavcodec.so.53: cannot open shared object file: No such file or directory

I installed ffmpeg with libav and trying the following commands:

sudo apt-get install ffmpeg libavcodec-dev libavformat-dev
sudo apt-get install ffmpeg libavcodec-extra-53
sudo apt-get install libav-tools

The error doesnt show up when I build the binary on the same machine, but it would be much faster to compile on a second machine.

UDPATE: I also ran sudo apt-get install update and sudo apt-get install pkg-config without any change in the output. (OS = 12.04)

回答1:

https://sites.google.com/site/linuxencoding/builds

try installing the linux binary for ffmpeg from the above website.

just so that every user benefits from this answer i am adding links to ffmpeg binaries available for different platforms

for centOS http://pkgs.repoforge.org/ffmpeg/

Tutorial for installation :

http://www.rackspace.com/knowledge_center/article/centos-installing-ffmpeg

for mac http://ffmpegmac.net/

for windows http://ffmpeg.zeranoe.com/builds/

also i have made a video tutorial to install a binary. but this is on mac. but i assume its the same for linux to.

https://www.youtube.com/watch?v=wiLNqg2IOAQ

hope this helps



标签: ffmpeg libav