尝试在 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/