您的位置:首页 > 其它

毕业设计辛酸路—在ubuntu下安装mplayer以及遇到的问题

2012-05-27 00:19 453 查看
今天尝试在ubuntu下安装mplayer,发现了很多以前没有遇到过的问题,记录下来,以便以后参考!

当./configure的时候,遇到以下错误:

1.Error: The GUI requires libavcodec with PNG support (needs zlib).

Check "configure.log" if you do not understand why it failed.

解决方法:

$wget http://www.zlib.net/zlib-1.2.3.tar.gz
$tar -xvzf zlib-1.2.3.tar.gz

$cd zlib-1.2.3.tar.gz

$./configure

$make $sudo make install

或者:最简单的方法

sudo apt-get install libpng12-dev

2.Error: X11 support required for GUI compilation.

Check "configure.log" if you do not understand why it failed.

解决方法:

sudo apt-get install libgtk1.2-dev

这会安装了15个包:
  libglib1.2 libglib1.2-dev libgtk1.2 libgtk1.2-common libgtk1.2-dev libx11-dev libxau-dev libxdmcp-dev libxext-dev libxi-dev pkg-config x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev

终于./configure 过了!!

3.make 后,又出现错误了:

In file included from mplayer.c:59:

libvo/font_load.h:5:22: error: ft2build.h: No such file or directory

libvo/font_load.h:6:10: error: #include expects "FILENAME" or

In file included from mplayer.c:59:

libvo/font_load.h:40: error: expected specifier-qualifier-list before 'FT_Face'

make: *** [mplayer.o] 错误 1

  其实在编译时加入--enable-freetype参数是为了解决字幕乱码的问题,但是加了之后make时出错.不加--enable- freetype是可以正常编译,不过GUI和字幕均为乱码.请教了N个人,最后得知,问题是因为当初安装编译环境的时候选择的是GTK1.2,更新为 2.0既可顺利编译:

sudo apt-get install libgtk2.0-dev

  make一下,各种warning,看得我都眼花,还好最后通过了,最后

sudo make install

4.但我编译的时候,又出现错误了:

vo_ivtv.c: In function 'ivtv_reset':

vo_ivtv.c:79: error: storage size of 'sd' isn't known

vo_ivtv.c:80: error: storage size of 'sd1' isn't known

vo_ivtv.c:84: error: 'IVTV_STOP_FL_HIDE_FRAME' undeclared (first use in this function)

vo_ivtv.c:84: error: (Each undeclared identifier is reported only once

vo_ivtv.c:84: error: for each function it appears in.)

vo_ivtv.c:87: error: 'IVTV_IOC_STOP_DECODE' undeclared (first use in this function)

vo_ivtv.c:97: error: 'IVTV_IOC_START_DECODE' undeclared (first use in this function)

vo_ivtv.c:80: warning: unused variable 'sd1'

vo_ivtv.c:79: warning: unused variable 'sd'

make[1]: *** [vo_ivtv.o] Error 1

make[1]: Leaving directory `/home/soul/software/mplayer/MPlayer-1.0rc2/libvo'

make: *** [libvo/libvo.a] 错误 2

  出现上面的错误后,首先运行make distclean 清除一下。

  在./configure ...... 那一些参数后在加 一个 --disable-ivtv 。

在make,经过N久,终于成功了!

然后make install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: