【发布时间】:2012-03-26 05:42:25
【问题描述】:
我正在从源代码编译 FFmpeg。
./configure --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-x11grab --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264
make
make install
ldd /usr/local/bin/ffmpeg 给了我这个
linux-gate.so.1 => (0xb7717000)
libavdevice.so.53 => not found
libavfilter.so.2 => not found
libavformat.so.54 => not found
libavcodec.so.54 => not found
libpostproc.so.52 => not found
libswresample.so.0 => not found
libswscale.so.2 => not found
libavutil.so.51 => not found
libm.so.6 => /lib/i386-linux-gnu/tls/i686/nosegneg/libm.so.6 (0xb76e3000)
libpthread.so.0 => /lib/i386-linux-gnu/tls/i686/nosegneg/libpthread.so.0 (0xb76ca000)
libc.so.6 => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6 (0xb7569000)
/lib/ld-linux.so.2 (0xb7718000)
将$LD_LIBRARY_PATH 设置为/usr/local/lib 更正了“未找到”错误,但由于here 提到的原因,我不想永久设置$LD_LIBRARY_PATH。
我使用相同的命令重新编译,这次将$LD_RUN_PATH 设置为/usr/local/lib。make 在编译时似乎忽略了$LD_RUN_PATH。
有没有一种方法可以使用$LD_RUN_PATH 而无需对 Makefile 进行大量更改?
【问题讨论】:
-
你可以手动链接成功吗(即在命令行上,不使用make)?
-
我不知道。我该如何测试呢?
-
你能告诉我们执行
ldd /usr/local/bin/ffmpeg的makefile部分吗? -
您是如何配置 FFmpeg 的(即,您将哪些选项传递给 ./configure 脚本)?构建后您是如何安装 FFmpeg 的;您是否手动将“ffmpeg”复制到/usr/local/lib?还是您执行了“make install”?
-
查看linux.die.net/man/8/ld-linux 中的变量
LD_DEBUG和LD_DEBUG_OUTPUT。
标签: compilation ffmpeg makefile ld