[英]ERROR: dav1d >= 0.2.1 not found using pkg-config
我正在尝试使用 dav1d 构建 ffmpeg。 我已经使用以下命令成功构建了 davit:
git clone --depth=1 https://code.videolan.org/videolan/dav1d.git && \
cd dav1d && \
mkdir build && cd build && \
meson .. && \
ninja
之后,我正在为 FFmpeg 运行配置命令并收到错误消息:
PKG_CONFIG_PATH="/app/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="/app/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I/app/ffmpeg_build/include" \
--extra-ldflags="-L/app/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--bindir="/usr/local/bin" \
--enable-gpl \
--enable-libass \
--enable-libmp3lame \
--enable-libfreetype \
--enable-libopus \
--enable-libvorbis \
--enable-libx264 \
--enable-libdav1d \
--enable-nonfree
(如果我省略--enable-libdav1d
,所有其他库都已安装,并且 FFmpeg 使用它们正确配置和构建,但在上述命令的情况下我得到):
ERROR: dav1d >= 0.2.1 not found using pkg-config
我认为原因可能是介子将 bin 文件放在错误的目录中。 有人可以帮忙吗?
PS 我正在使用 Ubuntu 18.04。
其他库的构建命令示例:
git -C x264 pull 2> /dev/null || git clone --depth 1 https://code.videolan.org/videolan/x264.git && \
cd x264 && \
PKG_CONFIG_PATH="/app/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/app/ffmpeg_build" --bindir="/usr/local/bin" --enable-static --enable-pic && \
make && \
make install
要通过构建,您必须添加ninja install
:
git clone --depth=1 https://code.videolan.org/videolan/dav1d.git && \
cd dav1d && \
mkdir build && cd build && \
meson --bindir="/usr/local/bin" .. && \
ninja && \
ninja install
但这还不够,如果你运行 FFmpeg 之后,你会得到:
ffmpeg: error while loading shared libraries: libdav1d.so.4: cannot open shared object file: No such file or directory
要解决此问题,请将/usr/local/lib/x86_64-linux-gnu
添加到LD_LIBRARY_PATH
:
export LD_LIBRARY_PATH+=":/usr/local/lib/x86_64-linux-gnu"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.