vlc 3.0 ./configure给出了“Missing libav或FFmpeg”,尽管我有它们

时间:2017-01-17 08:21:51

标签: linux ffmpeg vlc configure libavcodec

我正在尝试从源代码构建最新的vlc-3.0开发版本(git cloned),但运行./configure会给我以下错误:

configure: error: Missing libav or FFmpeg

尽管我已经从源代码构建并使用以下配置安装了一个新的ffmpeg-3.2.2,包括--enable-shared(见下文)。另外,在我的/ usr / lib目录中有一个库libavcodec.a,libavcodec.so.57.64.101,带有符号链接libavcodec.so和libavcodec.so.57

只看了https://github.com/videolan/vlc/blob/master/configure.ac源代码,它需要来自libav的libavcodec> = 57.16.0或来自ffmpeg的> = 57.37.100,并且57.64.101满足该要求所以仍然无法理解是错的。

也许我需要将一些额外的标志传递给vlc-3.0以强制它注意我的libavcodec库?如果是,我应该尝试哪些标志?

ffmpeg配置选项(以防万一):

--prefix=/usr --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --disable-libebur128 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-libopencv --enable-frei0r --enable-libx264 --enable-chromaprint --enable-shared

1 个答案:

答案 0 :(得分:2)

我从RémiDenis-Courmont在VLC论坛帖子中得到了一个非常有用的建议 - https://forum.videolan.org/viewtopic.php?f=13&t=137096

Make sure that "pkg-config --modversion libavcodec" works.
If not, then FFmpeg is essentially not installed.

此命令给了我以下错误消息:

Package libavcodec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libavcodec.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavcodec' found

检查了我的PKG_CONFIG_PATH变量 - 它是空的:

echo $PKG_CONFIG_PATH

然后我在/ usr目录中搜索了libavcodec.pc,找到了它:

find /usr -name "libav*.pc"
/usr/lib/pkgconfig/libavutil.pc
/usr/lib/pkgconfig/libavcodec.pc
/usr/lib/pkgconfig/libavfilter.pc
/usr/lib/pkgconfig/libavformat.pc
/usr/lib/pkgconfig/libavdevice.pc
/usr/lib/pkgconfig/libavresample.pc
/usr/lib64/pkgconfig/libavc1394.pc

现在我需要做的就是添加这些路径:/ usr / lib / pkgconfig /,以及/ usr / lib64 / pkgconfig /以防万一,以PKG_CONFIG_PATH(可以通过bashrc或任何其他方式完成)。之后,“pkg-config --modversion libavcodec”输出版本号libavcodec而不是错误,并且可以配置和构建vlc而没有任何问题! ^ _ ^