linux - CentOS 64位安装ffmpeg 'install with -fPIC'错误

标签 linux ffmpeg 64-bit

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

这是我的 ./configure 选项:

./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

制作

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

/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?

最佳答案

由于您使用“--enable-shared”配置了 FFMPEG,因此您还需要使用“--enable-shared”配置它的一些其他库,并且它们必须都使用相同的设置。

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

关于linux - CentOS 64位安装ffmpeg 'install with -fPIC'错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9506046/

相关文章:

linux - screen : how to turn on alternate screen?

html - 查看 HTML 代码而不是呈现的 HTML

ffmpeg - 未知编码器 libvo_aacenc

windows - 免费的 Windows 64 位 C++11 编译器

java - 如何阻止 cron 作业创建 attach_pid 文件?

linux - 在 Linux 中如何限制虚拟存储器

c - 使用 ffmpeg 将文件从一种格式转换为另一种格式

python - 如何从 Python 中的视频中创建一些选定帧的幻灯片?

c++ - ReadFileEx,可变长度——几个问题

c++ - Boost 链接器错误 : Unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)"