ffmpeg:加载共享库时出错:libopenh264.so.5 [英] ffmpeg: error while loading shared libraries: libopenh264.so.5
问题描述
我正在使用ffmpeg并收到此错误
I am using ffmpeg and getting this error
<代码>ffmpeg:加载共享库时出错:libopenh264.so.5:无法打开共享库文件:没有这样的文件或目录
我已经检查了该库是否存在并且确实存在.我已将此上一个问题中提到的添加到/etc/ld.so.conf中.不起作用.
I have already checked if the library exists and it does. I added it to /etc/ld.so.conf as mentioned in this previous question but it doesn't work.
推荐答案
在python 3.8环境下运行ffmpeg 4.2.2时,我遇到了此错误.
I faced this error when I run ffmpeg 4.2.2 under python 3.8 environment.
根本原因是来自python 3.8的 libopen264.so
对于ffmpeg 4.2.2来说太新了.我能找到〜/anaconda3/envs/py38/lib/
(py38是我的conda虚拟环境)下的 libopen264.so.6
,但是我们只需要一个较旧的版本libopen264.so.5
.
The root cause is that libopen264.so
from python 3.8 is too new for ffmpeg 4.2.2.
I can find
libopen264.so.6
under the ~/anaconda3/envs/py38/lib/
(py38 is my conda virtual environment), but we only need an older version libopen264.so.5
.
要解决该问题,我只需按照现有的anaconda环境(python 3.7)进行软链接,如下所示-并且可以正常工作.
To solve the problem, I just make a softlink from my existing anaconda environment (python 3.7) as follows - and it works.
ln -s〜/anaconda3/lib/libopenh264.so〜/anaconda3/envs/py38/lib/libopenh264.so.5
这篇关于ffmpeg:加载共享库时出错:libopenh264.so.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!