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

问题:ffmpeg: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory
解决办法:分别修改/etc/ld.so.conf文件进行lib、/etc/profile文件进行bin配置,以便加入环境变量。

1、修改/etc/ld.so.conf文件进行lib

例如:adminn@ubuntu:/usr/local/lib$ sudo vi /etc/ld.so.conf
修改如下:
include ld.so.conf.d/*.conf
/usr/local/lib          ///注意:usr/local/ 目录是我ffmpeg默认的安装前缀(目录),根据自己的安装目录酌情修改吧。
adminn@ubuntu:/usr/local/lib$ sudo ldconfig
2、/etc/profile文件进行bin配置,为 Ffmpeg 加入环境变量。
为 Ffmpeg 加入环境变量
vi /etc/profile
加入以下内容:
export PATH="/usr/local/ffmpeg/bin:$PATH"
然后保存并运行source /etc/profile。
3、验证配置是否生效。
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$
————————————————
                        
原文链接:https://blog.csdn.net/zhouxj0818/article/details/52679741

posted @   rainbow70626  阅读(91)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
历史上的今天:
2020-01-01 [转]在WorldWind中加入*.x格式的三维模型
点击右上角即可分享
微信分享提示