ffmpeg在安装x264播放器的时候出现 ERROR: libx264 not found

zz12006345 2014-07-24 03:17:06
我查了config.log 里面显示是

gcc -L./x264 -Wl,--as-needed -o /tmp/ffconf.ZNG31130 /tmp/ffconf.xCt31136.o -lx264 -lm -lbz2 -lz -pthread -lrt
./x264/libx264.a(opencl.o): In function `x264_opencl_close_library':
opencl.c:(.text+0x572): undefined reference to `dlclose'
./x264/libx264.a(opencl.o): In function `x264_opencl_load_library':
opencl.c:(.text+0x5d7): undefined reference to `dlopen'
opencl.c:(.text+0x5f1): undefined reference to `dlsym'
opencl.c:(.text+0x60e): undefined reference to `dlsym'
opencl.c:(.text+0x62b): undefined reference to `dlsym'
opencl.c:(.text+0x648): undefined reference to `dlsym'
opencl.c:(.text+0x665): undefined reference to `dlsym'
./x264/libx264.a(opencl.o):opencl.c:(.text+0x682): more undefined references to `dlsym' follow
./x264/libx264.a(opencl.o): In function `x264_opencl_load_library':
opencl.c:(.text+0x8fd): undefined reference to `dlclose'
./x264/libx264.a(opencl.o): In function `x264_opencl_lookahead_init':
opencl.c:(.text+0x1841): undefined reference to `dlopen'
opencl.c:(.text+0x185b): undefined reference to `dlsym'
opencl.c:(.text+0x186d): undefined reference to `dlsym'
opencl.c:(.text+0x1881): undefined reference to `dlsym'
opencl.c:(.text+0x1895): undefined reference to `dlsym'
opencl.c:(.text+0x18d4): undefined reference to `dlclose'
collect2: ld returned 1 exit status

应该是编译这个问题的时候少了一个 -ldl 请问这个问题怎么解决?
...全文
1127 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
petersoap 2015-07-21
  • 打赏
  • 举报
回复
我是用楼主的方法,显示了Unknown option --extra-libs=-ldl, ignored请问这是为什么呢?
Frank范 2014-11-20
  • 打赏
  • 举报
回复
./configure --extra-libs=-ld 直接用这个命令
Frank范 2014-11-19
  • 打赏
  • 举报
回复
要在./configure 选项的哪个地方加上 --extra-libs=-ld 啊。我现在也出现这个问题了。怎么解决呢?
zz12006345 2014-07-27
  • 打赏
  • 举报
回复
引用 4 楼 zhao4zhong1 的回复:
./configure make su 输入root用户的密码 make install
解决了。。。只要在configure选项里面加上 --extra-libs=-ldl就可以了
赵4老师 2014-07-24
  • 打赏
  • 举报
回复
./configure make su 输入root用户的密码 make install
赵4老师 2014-07-24
  • 打赏
  • 举报
回复
引用 2 楼 zz12006345 的回复:
makefile使用shell写的。。找不到把路径加在哪里怎么办。。。
仔细找,应该能找到。
zz12006345 2014-07-24
  • 打赏
  • 举报
回复
makefile使用shell写的。。找不到把路径加在哪里怎么办。。。
赵4老师 2014-07-24
  • 打赏
  • 举报
回复
在GUI配置相应项或makefile里面的gcc命令行中添加-ldl
首先要升级相关程序 1. yasm-1.2.0 1.1 下载文件 wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz 1.2 安装方法如下 1.2.1. tar -zxvf yasm-1.2.0.tar.gz 1.2.2 cd yasm-1.2.0 1.2.3 ./configure 1.2.4 make 1.2.5 make install 2. 安装autoconf、automake、libtool sudo apt-get install autoconf automake libtool 3. 安装libopencore-amrnb-dev libopencore-amrwb-dev sudo apt-get install libopencore-amrnb-dev libopencore-amrwb-dev 4. 安装gcc sudo apt-get install gcc 5. 其中一个解码器源码头文件错误,根据提示注释掉该头文件错误的函数声明即可 接下来安装各种解码器 1. lame 1.1 下载地址:http://sourceforge.net/projects/lame/files/lame/ 在该地址下下载最新版本的lame. 1.2 下载文件(当前最新版本是3.99.5) wget http://colocrossing.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz 1.3 安装方法如下 1.3.1. tar -zxvf lame-3.99.5.tar.gz 1.3.2 cd lame-3.99.5 1.3.3 ./configure --enable-shared 1.3.4 make 1.3.5 make install 2. libogg 2.1 下载地址:http://www.xiph.org/downloads/ 在该地址下下载最新版本的libogg . 2.2 下载文件(当前最新版本是1.3.1) wget http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz 2.3 安装方法如下 2.3.1. tar -zxvf libogg-1.3.1.tar.gz 2.3.2 cd libogg-1.3.1 2.3.3 ./configure 2.3.4 make 2.3.5 make install 3. libvorbis 3.1 下载地址:http://downloads.xiph.org/releases/vorbis/ 在该地址下下载最新版本的libvorbis . 3.2 下载文件(当前最新版本是1.3.4) wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz 3.3 安装方法如下 3.3.1. tar -zxvf libvorbis-1.3.4.tar.gz 3.3.2 cd libvorbis-1.3.4 3.3.3 ./configure 3.3.4 make 3.3.5 make install 4. xvid 4.1 下载地址:http://downloads.xvid.org/downloads 在该地址下下载最新版本的xvid. 4.2 下载文件(当前最新版本是1.3.2) wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz 4.3 安装方法如下 4.3.1. tar -zxvf xvidcore-1.3.2.tar.gz 4.3.2 cd xvidcore-1.3.2/build/generic 4.3.3 ./configure 4.3.4 make 4.3.5 make install 5. x264 5.1 下载文件 git clone git://git.videolan.org/x264.git 5.2 安装方法如下 5.2.1 cd x264 5.2.2 ./configure --disable-asm --enable-static --enable-shared 5.2.3 make 5.2.4 make install 6. libdts 6.1 下载地址:http://www.videolan.org/developers/libdca.html 在该地址下下载最新版本的libdts. 6.2 下载文件(当前最新版本是0.0.5)wget http://download.videolan.org/pub/videolan/libdca/0.0.5/libdca-0.0.5.tar.bz2 6.3 安装方法如下 6.3.1. tar -jxvf libdca-0.0.5.tar.bz2 6.3.2 cd libdca-0.0.5 6.3.3 ./configure 6.3.4 make 6.3.5 make install 7. a52 7.1 下载地址:http://liba52.sourceforge.net/downloads.html 在该地址下下载最新版本的a52. 7.2 下载文件(当前最新版本是0.7.4) wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz 7.3 安装方法如下 7.3.1. tar -zxvf a52dec-0.7.4.tar.gz 7.3.2 cd a52dec-0.7.4 7.3.3 ./configure 7.3.4 make 7.3.5 make install 8. faad2 8.1 下载地址:http://www.audiocoding.com/downloads.html 在该地址下下载最新版本的faad2. 8.2 下载文件(当前最新版本是2.7) wget http://hivelocity.dl.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz 8.3 安装方法如下 8.3.1. tar -zxvf faad2-2.7.tar.gz 8.3.2 cd faad2-2.7 8.3.3 autoreconf -vif 8.3.4 ./configure --with-mp4v2 --enable-shared 8.3.5 make 8.3.6 make install 9. faac 9.1 下载地址:http://www.audiocoding.com/downloads.html 在该地址下下载最新版本的faac. 9.2 下载文件(当前最新版本是1.28) wget http://hivelocity.dl.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz 9.3 安装方法如下 9.3.1. tar -zxvf faac-1.28.tar.gz 9.3.2 cd faac-1.28 9.3.3 ./bootstrap 9.3.4 ./configure 9.3.5 make 9.3.6 make install 10. amr-nb 10.1 下载地址:https://code.google.com/p/ostube/downloads/detail?name=amrnb-10.0.0.0.tar.bz2&can=2&q= 在该地址下下载最新版本的amr-nb. 10.2 下载文件(当前最新版本是10.0.0.0) wget https://ostube.googlecode.com/files/amrnb-10.0.0.0.tar.bz2 10.3 安装方法如下 10.3.1. tar -jxvf amrnb-10.0.0.0.tar.bz2 10.3.2 cd amrnb-10.0.0.0 10.3.3 ./configure 10.3.4 make 10.3.5 make install 11. amr-wb 11.1 下载地址:https://code.google.com/p/hio/downloads/detail?name=amrwb-7.0.0.1.tar.bz2&can=2&q= 在该地址下下载最新版本的amr-wb. 11.2 下载文件(当前最新版本是7.0.0.1) wget https://hio.googlecode.com/files/amrwb-7.0.0.1.tar.bz2 11.3 安装方法如下 11.3.1. tar -jxvf amrwb-7.0.0.1.tar.bz2 11.3.2 cd amrwb-7.0.0.1 11.3.3 ./configure 11.3.4 make 11.3.5 make install 解决:ERROR: libmp3lame >= 3.98.3 not found sudo apt-get install libmp3lame-dev 下载: http://kakola.googlecode.com/files/lame-3.98.4.tar.gz 运行命令: wget http://kakola.googlecode.com/files/lame-3.98.4.tar.gz 安装lame-3.98.4.tar.gz, 以免在第三步的时候出现ERROR: libmp3lame >= 3.98.3 not found错误, 需要提前安装lame. tar zvxf lame-3.98.4.tar.gz cd lame-3.98.4 ./configure --enable-shared make make install 12.修改配置文件,并重新启动计算机 编辑 ld.so.conf vi /etc/ld.so.conf 添加一行 /usr/local/lib 13. 安装ffmpeg 13.1 下载地址:http://ffmpeg.org/releases/ 在该地址下下载最新版本的ffmpeg 13.2 下载文件(当前最新版本是2.1.3) wget http://ffmpeg.org/releases/ffmpeg-2.1.3.tar.bz2 13.3 安装方法如下 13.3.1. tar -jxvf ffmpeg-2.1.3.tar.bz2 13.3.2 cd ffmpeg-2.1.3 13.3.3 ./configure --prefix=/usr/local/ffmpeg2 --disable-static --enable-shared --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay 13.3.4 make 13.3.5 make install

69,373

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧