ffmpeg 安装在 CentOS 64 位“使用 -fPIC 安装"错误 [英] ffmpeg install on CentOS 64-bit 'install with -fPIC' error

查看:24
本文介绍了ffmpeg 安装在 CentOS 64 位“使用 -fPIC 安装"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在 64 位 CentOS 机器上编译 ffmpeg 时出现此错误.

I get this error when attempting to compile ffmpeg on a 64bit CentOS machine.

这是我的 ./configure 选项:

Here are my ./configure options:

./configure --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-swscale --enable-pthreads --enable-libx264 --enable-libxvid --enable-libvorbis --enable-libfaac --enable-libmp3lame --enable-libvpx

制作

编译源代码时出现以下错误:

I get the following error when compiling the source:

/usr/bin/ld: /usr/local/lib/libvpx.a(vpx_codec.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libvpx.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libavcodec/libavcodec.so.54] Error 1

如何解决此错误,并在我的 64 位 CentOS 机器上使用最新的 ffmpeg 启动并运行 libvpx?

How do I get around this error, and get libvpx up and running with the latest ffmpeg on my 64-bit CentOS box?

推荐答案

既然你用--enable-shared"配置了FFMPEG,你还需要用--enable-shared"配置它的一些其他库,并且它们都必须使用相同的设置.

Since you configured FFMPEG with "--enable-shared", you also need to configure some of it's other libraries with "--enable-shared" also, and they must all use the same setting.

这个错误信息基本上是告诉你在configure命令中添加--enable-shared"再次编译libvpx,然后再次尝试编译FFMPEG(也配置了--enable-shared").很可能你会得到同样的错误,但它会说libx264"或libmp3lame"而不是libvpx",所以你还需要在配置命令中使用--enable-shared"重新编译这些库.

This error message is basically telling you to compile libvpx again with "--enable-shared" added to the configure command, then try compiling FFMPEG again (also configured with "--enable-shared"). Chances are that you will then get the same error but it will say "libx264" or "libmp3lame" instead of "libvpx", so you will also need to recompile those libs with "--enable-shared" in the configure command.

这篇关于ffmpeg 安装在 CentOS 64 位“使用 -fPIC 安装"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆