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

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

adminn @ ubuntu: / usr / local / lib $ sudo vi /etc/ld.so.conf

Modify as follows

include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib // /usr/local/ffmpeg directory is my ffmpeg installation directory, change it according to your installation directory
adminn@ubuntu:/usr/local /lib$ 
adminn@ubuntu:/usr/local/lib$ 
adminn@ubuntu:/usr/local/lib$ 
adminn@ubuntu:/usr/local/lib$ ldconfig
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
adminn@ubuntu:/usr/local/lib$ sudo ldconfig


Add the following to the environment variable vi /etc/profile for Ffmpeg
:
export PATH="/usr/local/ffmpeg/bin:$PATH"

Then save and run source /etc/profile


adminn@ubuntu:/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
adminn@ubuntu:/usr/local/lib$ 


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325905463&siteId=291194637