问题ffmpeg: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory
[email protected]:/usr/local/lib$ sudo vi /etc/ld.so.conf
修改如下
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib ///usr/local/ffmpeg 目录是我ffmpeg安装目录,根据你的安装目录改吧
[email protected]:/usr/local/lib$
[email protected]:/usr/local/lib$
[email protected]:/usr/local/lib$
[email protected]:/usr/local/lib$ ldconfig
/sbin/ldconfig.real: Can‘t create temporary cache file /etc/ld.so.cache~: Permission denied
[email protected]:/usr/local/lib$ sudo ldconfig
为 Ffmpeg 加入环境变量
vi /etc/profile
加入以下内容:
export PATH="/usr/local/ffmpeg/bin:$PATH"
然后保存并运行source /etc/profile
[email protected]:/usr/local/lib$ ffmpeg -version
ffmpeg version 3.1.3 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --enable-shared --disable-yasm --prefix=/usr/local/ffmpeg
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
[email protected]:/usr/local/lib$
原文地址:https://www.cnblogs.com/blackhumour2018/p/9427836.html