标签:code err avd for pat red 修改 ubunt 保存
问题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
修改如下
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib ///usr/local/ffmpeg 目录是我ffmpeg安装目录,根据你的安装目录改吧
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
为 Ffmpeg 加入环境变量
vi /etc/profile
加入以下内容:
export PATH="/usr/local/ffmpeg/bin:$PATH"
然后保存并运行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$
ffmpeg: error while loading shared libraries: libavdevice.so.57
标签:code err avd for pat red 修改 ubunt 保存
原文地址:https://www.cnblogs.com/blackhumour2018/p/9427836.html