LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1105|回复: 5

FC8 安装MPlayer出现问题,请高手指教。

[复制链接]
发表于 2008-1-13 21:55:08 | 显示全部楼层 |阅读模式
以下是安装过程及出现的错误提示
主程序:MPlayer-1.0rc1.tar.bz2
解码器:all-20061022.tar.bz2     windows-all-20061022.zip
皮    肤:PowerPlayer-1.1.tar.bz2
解码器文件分别解压到/usr/lib/codecs和/usr/lib/wincodecs
使用如下命令做编译前的配置
./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype --with-codecsdir=/usr/lib/codecs/ --with-win32libdir=/usr/lib/wincodecs/ --language=zh_CN
出现如下错误:
Checking for GUI ... yes

Error: The GUI requires PNG support, please install libpng and libpng-dev packages.

Check "configure.log" if you do not understand why it failed.
在配置日志configure.log中找到如下内容:
int main(void) {
  printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
  printf("libpng: %s\n", png_libpng_ver);
  return (strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver));
}

cc -O4 -march=pentium-m -mtune=pentium-m -pipe -ffast-math -fomit-frame-pointer      -o /tmp/mplayer-conf-6952-11077.o /tmp/mplayer-conf-11770-
11077.c -lpng -lz -lm
In file included from /tmp/mplayer-conf-11770-11077.c:1:
/usr/include/png.h:417:18: error: zlib.h: No such file or directory
In file included from /usr/include/png.h:421,
                 from /tmp/mplayer-conf-11770-11077.c:1:
/usr/include/pngconf.h:1258: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/pngconf.h:1259: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/pngconf.h:1260: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from /tmp/mplayer-conf-11770-11077.c:1:
/usr/include/png.h:1164: error: expected specifier-qualifier-list before 'z_stream'

ldd /tmp/mplayer-conf-6952-11077.o
ldd: /tmp/mplayer-conf-6952-11077.o: No such file or directory

Result is: no
我觉得可能是找不到png.h和pngconf.h(个人感觉是这个问题)

于是我查看了下libpng和libpng-devel是否安装
查到libpng所含文件的安装位置如下:
[root@chenyz-laptop MPlayer-1.0rc1]# rpm -ql libpng
/usr/lib/libpng.so.3
/usr/lib/libpng.so.3.22.0
/usr/lib/libpng12.so.0
/usr/lib/libpng12.so.0.22.0
/usr/share/doc/libpng-1.2.22
/usr/share/doc/libpng-1.2.22/CHANGES
/usr/share/doc/libpng-1.2.22/LICENSE
/usr/share/doc/libpng-1.2.22/README
/usr/share/doc/libpng-1.2.22/TODO
/usr/share/doc/libpng-1.2.22/example.c
/usr/share/doc/libpng-1.2.22/libpng-1.2.22.txt
/usr/share/man/man5/png.5.gz

查到libpng-devel所含文件安装位置如下:
[root@chenyz-laptop MPlayer-1.0rc1]# rpm -ql libpng-devel
/usr/bin/libpng-config
/usr/bin/libpng12-config
/usr/include/libpng12
/usr/include/libpng12/png.h
/usr/include/libpng12/pngconf.h
/usr/include/png.h
/usr/include/pngconf.h
/usr/lib/libpng.so
/usr/lib/libpng12.so
/usr/lib/pkgconfig/libpng.pc
/usr/lib/pkgconfig/libpng12.pc
/usr/share/man/man3/libpng.3.gz
/usr/share/man/man3/libpngpf.3.gz

到此已确定libpng和libpng-devel都已安装了,但是检测不到。
于是查看configure中的帮助,发现如下选项:
--with-extraincdir=DIR   extra headers (png, mad, sdl, ...) in DIR (*)
我觉得这个可能是指定png.h和pngconf.h目录,于是使用如下命令重新做编译前配置。 ./configure --prefix=/usr/local/mplayer --enable-gui --enable-freetype --with-codecsdir=/usr/lib/codecs/ --with-win32libdir=/usr/lib/wincodecs/ --with-extraincdir=/usr/lib/ --language=zh_CN
但是仍然出现同样的错误。
我崩溃,请高手指点
发表于 2008-1-13 22:29:52 | 显示全部楼层
hehe,干脆加liva源安装好了,省事。还有plugin
回复 支持 反对

使用道具 举报

发表于 2008-1-14 22:20:48 | 显示全部楼层
我看还没有安装libpng-devel。。吧!!
$rpm -qa |grep "libpng*"

libpng-1.2.10-7
libpng-devel-1.2.10-7

在我这里查询结果其中有这么两项的哦,当然我用的是f6!
回复 支持 反对

使用道具 举报

发表于 2008-1-15 12:06:19 | 显示全部楼层
是不是语法有些不同?用gcc34看看;
实在不行,用FC6编译,然后拷过来试试。
回复 支持 反对

使用道具 举报

发表于 2008-1-15 16:59:54 | 显示全部楼层
yum install compat-gcc*试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-1-17 09:36:50 | 显示全部楼层
可能是编译安装需要的包没装全  但肯定不是libpng和libpng-devel 我把整个系统重装了 把开发环境都选上了  这会儿装成功了 但不知道是缺啥包  不过还是谢谢大家
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表