今天尝试在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-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 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': 出现上面的错误后,首先运行make distclean 清除一下。 在./configure ...... 那一些参数后在加 一个 --disable-ivtv 。 在make,经过N久,终于成功了! |
|