网上有很多的方法,完全按照网上方法均未成功,经过反复尝试终于安装上了,特此记下:
需要文件:
1.MPlayer-1.0rc3.tar.bz2 : http://www.mplayerhq.hu/MPlayer/releases/
2.skin Blue-1.7.tar.bz2 :http://www.mplayerhq.hu/MPlayer/skins/
3.font: gb2312-ming.tar.bz2 :http://www.mplayerhq.hu/MPlayer/contrib/fonts/chinesefonts/
4. codecs:all-20100303.tar.bz2:http://www.mplayerhq.hu/MPlayer/releases/codecs/
首先创建目录: sudo mkdir -p /usr/local/mplayer/share/mplayer/font/;
sudo mkdir -p /usr/local/mplayer/share/mplayer/skins/;
sudo mkdir -p /usr/lib/codecs;
sudo mkdir -p /etc/mplayer
安装codecs:
tar jxvf all-20071007.tar.bz2;
mv all-20071007 /usr/lib/codecs;
安装字体:
tar xjvf gb2312-ming.tar.bz2;
mv gb2312-ming /usr/local/mplayer/share/mplayer/font/;
安装skin:
tar xjvf Blue-1.7.tar.bz2;
mv Blue /usr/local/mplayer/share/mplayer/skins/;
cd /usr/local/mplayer/share/mplayer/skins/;
ln -s Blue default;
(如果执行是报错说找不到default ,则直接将Blue命名为default, 命令:mv Blue default)
编译安装mplayer:
yum install -y gtk2-devel glib2-devel zlib* gcc;
tar jxvf MPlayer-1.0rc2.tar.bz2;
cd MPlayer-1.0rc2;
./configure --enable-gui --enable-menu --prefix=/usr/local/mplayer --codecsdir=/usr/lib/codecs --confdir=/etc/mplayer --cc=gcc3 --disable-ivtv;
make;
make install;
安装完成;
可以创建快捷方式(参见我的另一篇文章,fedora下创建快捷方式),也可以直接/usr/local/mplayer/bin/gmplayer启动;
故障分析及其解决
安装完后,我们启动MPlayer,有可能会出现如下这样的错误: ”New_Face faild. Maybe the font path is wrong. please supply the text font file. ( ~/.mplayer/subfont.ttf ).”
这时候我们用系统自带的字体来代替.
[root@banseon Download]# cd /usr/share/fonts/chinese/TrueType(如果执行失败直接执行下一句)
[root@banseon Download]# cp gbsn00lp.ttf ~/.mplayer/subfont.ttf 这样就解决了字体问题了
如果没有声音:
mknod /dev/dsp c 14 3
chmod 666 /dev/dsp
搞定!
参考:http://hi.baidu.com/fufengrui/item/47395cd785c05a1820e25046