symbol avpriv_float_dsp_init, version LIBAVUTIL_51 not defined in file libavutil.so.51 with link tim

20 篇文章 0 订阅
17 篇文章 0 订阅

* 下载ffmpeg和x264的源码

这个自己google

* 配置文件选项

./configure --enable-shared --enable-shared --enable-gpl --enable-nonfree --enable-x11grab --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid

错误列表及解决:

* 缺少libXXX的错误

查找并安装apt-get install libXXX
* 更新libx264的版本
Ubuntu默认安装的libx264-dev的版本不能在最新的ffmpeg中使用,因此需要更新libx264的版本。
** 删除libx264-dev 
sudo apt-get remove x264 libx264-dev
** 下载最新的x264源代码并编译
./configure --enable-static
make
**  安装x264的过程将会安装相应的库
make install

* 其他错误
** error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
this error usually comes when ldconfig does not know where to search for the libraries, so, in order to help it out,  on my fedora/centos systems, i did the following:
cd /etc/ld.so.conf.d
add another file:  custom-libs.conf
inside, put :
/usr/local/lib
save,
then do ldconfig

** "ffmpeg: relocation error: /usr/local/lib/libswresample.so.0: symbol av_get_default_channel_layout, version LIBAVUTIL_51 not defined in file libavutil.so.51 with link time reference"

通过locate libavutil.so.51可以知道系统中不止存在一个此库,并使用ldd `which ffmpeg`查看ffmpeg使用了哪一个库文件,猜想是由于没有加载正确的库文件造成的,因此采用上一个错误的解决方法,问题解决。

version LIBAVUTIL_51 not defined in file

通过locate libavutil.so.51可以知道系统中不止存在一个此库,并使用ldd `which ffmpeg` | grep 
libavutil.so.51
查看ffmpeg使用了哪一个库文件,
猜想是由于没有加载正确的库文件造成的,因此采用上一个错误的解决方法,问题解决。删掉指向错误的so文件,将编译出的so文件拷贝至该地方。

 

解决linux下so loading error

 

./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory
那就表示系統不知道xxx.so 放在哪個目錄下。
這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。
 一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。
將 /etc/ld.so.conf存檔後,還要執行「/sbin/ldconfig –v」來更新一下才會生效。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值