红联Linux门户
Linux帮助

分享下在centos 5.1安装mplayer成功

发布时间:2008-01-19 15:24:32来源:红联作者:relaaxx
前两天,在红联一直喊有没有人在centos 5.1安装mplayer成功,自己一直也在GOOGLE,可一直找不到解决问题的办法,不是这样错误,就是那样错误,最后,还是算了,谁叫你gcc 那么新呐?于是,自己去centos官方主页,看到了一个解决办法,(怎么自己一直没想到哎~~),现在,把解决的办法贴上来,算是分享吧。具体参考:
http://wiki.centos.org/Repositories/RPMForge
en水平好的同仁会看得懂滴 ^_^
说明方便,我就说一二三吧(领导都说了,你怎么说话老是要说一二三,唉,没办法呀,我没说if for struct 就不错了,BS!)
一、你可能要安装一个插件,特好用,yum速度一流,yum install yum-fastestmirror(我这边可以达到800K+/S)
二、yum install yum-priorities
三、经过二后,你可以打开/etc/yum/pluginconf.d/priorities.conf 编辑成如下样子:
[main]
enabled=1
四、编辑 /etc/yum.repos.d/ ;改成如下形式:
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
priority=2

其实是修改成:
[base], [addons], [updates], [extras] ... priority=1
[centosplus],[contrib] ... priority=2
Third Party Repos such as rpmforge ... priority=N (where N is > 10 and based on your preference)
五、下载(请对应于你的计算机系统)
i386 http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
x86_64 http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
六、安装密钥 Install DAG's GPG key
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
检查一下:rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm(这步不一定必须)
安装:rpm -ivh rpmforge-release-0.3.6-1.el5.rf.*.rpm
七、检查更新:
yum check-update
这步时间可能过长,系统会建立一个primary.xml.gz文件哦。成功后,最后一步吧
八、yum install mplayer* 看样子是如下形式:
[root@centos installed]# yum check-update
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading "installonlyn" plugin
Setting up repositories
rpmforge 100% |=========================| 1.1 kB 00:01
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 504 kB 01:33
http://apt.sw.be/redhat/el5/en/i386/dag/repodata/primary.xml.gz: [Errno 4] Socket Error: timed out
Trying other mirror.
primary.xml.gz 100% |=========================| 1.5 MB 11:57
################################################## 6021/6021
214 packages excluded due to repository priority protections

flash-plugin.i386 9.0.115.0-1.el5.rf rpmforge
hsqldb.i386 1:1.8.0.4-3jpp.6 updates
libXfont.i386 1.2.2-1.0.3.el5_1 updates
openoffice.org-calc.i386 1:2.0.4-5.4.25 updates
openoffice.org-core.i386 1:2.0.4-5.4.25 updates
openoffice.org-draw.i386 1:2.0.4-5.4.25 updates
openoffice.org-graphicfilter.i386 1:2.0.4-5.4.25 updates
openoffice.org-impress.i386 1:2.0.4-5.4.25 updates
openoffice.org-langpack-zh_CN.i386 1:2.0.4-5.4.25 updates
openoffice.org-langpack-zh_TW.i386 1:2.0.4-5.4.25 updates
openoffice.org-math.i386 1:2.0.4-5.4.25 updates
openoffice.org-writer.i386 1:2.0.4-5.4.25 updates
openoffice.org-xsltfilter.i386 1:2.0.4-5.4.25 updates
xorg-x11-server-Xnest.i386 1.1.1-48.26.el5_1.4 updates
xorg-x11-server-Xorg.i386 1.1.1-48.26.el5_1.4 updates
[root@centos installed]# yum install mplayer*
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
214 packages excluded due to repository priority protections
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for mplayer-fonts to pack into transaction set.
mplayer-fonts-1.1-3.0.rf. 100% |=========================| 14 kB 00:01
---> Package mplayer-fonts.noarch 0:1.1-3.0.rf set to be updated
---> Downloading header for mplayer-skins to pack into transaction set.
mplayer-skins-1.8-1.nodis 100% |=========================| 235 kB 00:32
---> Package mplayer-skins.noarch 0:1.8-1.nodist.rf set to be updated
---> Downloading header for mplayer-docs to pack into transaction set.
mplayer-docs-1.0-0.38.rc1 100% |=========================| 103 kB 00:13
---> Package mplayer-docs.i386 0:1.0-0.38.rc1try2.el5.rf set to be updated
---> Downloading header for mplayer to pack into transaction set.
mplayer-1.0-0.38.rc1try2. 100% |=========================| 43 kB 00:03
---> Package mplayer.i386 0:1.0-0.38.rc1try2.el5.rf set to be updated
---> Downloading header for mplayerplug-in to pack into transaction set.
mplayerplug-in-3.50-1.el5 100% |=========================| 9.9 kB 00:05
---> Package mplayerplug-in.i386 0:3.50-1.el5.rf set to be updated
--> Running transaction check
--> Processing Dependency: libaa.so.1 for package: mplayer
--> Processing Dependency: libmad.so.0 for package: mplayer
--> Processing Dependency: libxvidcore.so.4 for package: mplayer
--> Processing Dependency: libenca.so.0 for package: mplayer
--> Processing Dependency: libXvMC.so.1 for package: mplayer
--> Processing Dependency: libtwolame.so.0 for package: mplayer
--> Processing Dependency: libcaca.so.0 for package: mplayer
--> Processing Dependency: libdvdnav.so.4 for package: mplayer
--> Processing Dependency: libXvMCW.so.1 for package: mplayer
--> Processing Dependency: liblirc_client.so.0 for package: mplayer
--> Processing Dependency: libungif.so.4 for package: mplayer
--> Processing Dependency: libmp3lame.so.0 for package: mplayer
--> Processing Dependency: libopenal.so.0 for package: mplayer
--> Processing Dependency: libx264.so.55 for package: mplayer
--> Processing Dependency: libcucul.so.0 for package: mplayer
--> Processing Dependency: libfaac.so.0 for package: mplayer
--> Processing Dependency: libartsc.so.0 for package: mplayer
--> Processing Dependency: libfribidi.so.0 for package: mplayer
--> Processing Dependency: libdirectfb-0.9.so.25 for package: mplayer
--> Processing Dependency: libgif.so.4 for package: mplayer
--> Processing Dependency: liblzo.so.1 for package: mplayer
--> Processing Dependency: libmpcdec.so.5 for package: mplayer
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for lirc to pack into transaction set.
lirc-0.6.6-4.el5.rf.i386. 100% |=========================| 26 kB 00:07
---> Package lirc.i386 0:0.6.6-4.el5.rf set to be updated
---> Downloading header for directfb to pack into transaction set.
directfb-0.9.25.1-1.el5.r 100% |=========================| 31 kB 00:04
---> Package directfb.i386 0:0.9.25.1-1.el5.rf set to be updated
---> Downloading header for xvidcore to pack into transaction set.
xvidcore-1.1.3-1.el5.rf.i 100% |=========================| 4.4 kB 00:00
---> Package xvidcore.i386 0:1.1.3-1.el5.rf set to be updated
---> Downloading header for aalib to pack into transaction set.
aalib-1.4.0-5.el5.rf.i386 100% |=========================| 6.1 kB 00:00
---> Package aalib.i386 0:1.4.0-5.el5.rf set to be updated
---> Downloading header for fribidi to pack into transaction set.
fribidi-0.10.7-5.1.i386.r 100% |=========================| 4.8 kB 00:00
---> Package fribidi.i386 0:0.10.7-5.1 set to be updated
---> Downloading header for arts to pack into transaction set.
arts-1.5.4-1.i386.rpm 100% |=========================| 24 kB 00:05
---> Package arts.i386 8:1.5.4-1 set to be updated
---> Downloading header for lzo to pack into transaction set.
lzo-1.08-4.2.el5.rf.i386. 100% |=========================| 5.1 kB 00:00
---> Package lzo.i386 0:1.08-4.2.el5.rf set to be updated
---> Downloading header for openal to pack into transaction set.
openal-0.0.8-2.el5.rf.i38 100% |=========================| 4.5 kB 00:01
---> Package openal.i386 0:0.0.8-2.el5.rf set to be updated
---> Downloading header for twolame to pack into transaction set.
twolame-0.3.12-1.el5.rf.i 100% |=========================| 4.1 kB 00:01
---> Package twolame.i386 0:0.3.12-1.el5.rf set to be updated
---> Downloading header for libdvdnav to pack into transaction set.
libdvdnav-0.1.10-3.el5.rf 100% |=========================| 4.1 kB 00:00
---> Package libdvdnav.i386 0:0.1.10-3.el5.rf set to be updated
---> Downloading header for enca to pack into transaction set.
enca-1.9-4.el5.rf.i386.rp 100% |=========================| 4.9 kB 00:00
---> Package enca.i386 0:1.9-4.el5.rf set to be updated
---> Downloading header for faac to pack into transaction set.
faac-1.25-2.el5.rf.i386.r 100% |=========================| 4.2 kB 00:00
---> Package faac.i386 0:1.25-2.el5.rf set to be updated
---> Downloading header for libXvMC to pack into transaction set.
libXvMC-1.0.2-2.1.i386.rp 100% |=========================| 6.2 kB 00:00
---> Package libXvMC.i386 0:1.0.2-2.1 set to be updated
---> Downloading header for libmpcdec to pack into transaction set.
libmpcdec-1.2.6-1.el5.rf. 100% |=========================| 4.2 kB 00:01
---> Package libmpcdec.i386 0:1.2.6-1.el5.rf set to be updated
---> Downloading header for x264 to pack into transaction set.
x264-0.0.0-0.4.20070529.e 100% |=========================| 4.5 kB 00:00
---> Package x264.i386 0:0.0.0-0.4.20070529.el5.rf set to be updated
---> Downloading header for libmad to pack into transaction set.
libmad-0.15.1b-4.el5.rf.i 100% |=========================| 4.2 kB 00:00
---> Package libmad.i386 0:0.15.1b-4.el5.rf set to be updated
---> Downloading header for lame to pack into transaction set.
lame-3.97-1.el5.rf.i386.r 100% |=========================| 6.3 kB 00:04
---> Package lame.i386 0:3.97-1.el5.rf set to be updated
---> Downloading header for libcaca to pack into transaction set.
libcaca-0.99-0.1.beta11.e 100% |=========================| 3.7 kB 00:00
---> Package libcaca.i386 0:0.99-0.1.beta11.el5.rf set to be updated
---> Downloading header for giflib to pack into transaction set.
giflib-4.1.3-7.1.el5.1.i3 100% |=========================| 5.2 kB 00:00
---> Package giflib.i386 0:4.1.3-7.1.el5.1 set to be updated
--> Running transaction check
--> Processing Dependency: libsndfile.so.1 for package: twolame
--> Processing Dependency: libglut.so.3 for package: libcaca
--> Processing Dependency: libmp4v2.so.0 for package: faac
--> Processing Dependency: libsndfile.so.1(libsndfile.so.1.0) for package: twolame
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libsndfile to pack into transaction set.
libsndfile-1.0.17-1.el5.r 100% |=========================| 5.5 kB 00:00
---> Package libsndfile.i386 0:1.0.17-1.el5.rf set to be updated
---> Downloading header for freeglut to pack into transaction set.
freeglut-2.4.0-7.1.el5.i3 100% |=========================| 8.6 kB 00:11
---> Package freeglut.i386 0:2.4.0-7.1.el5 set to be updated
---> Downloading header for libmp4v2 to pack into transaction set.
libmp4v2-1.5.0.1-3.el5.rf 100% |=========================| 4.7 kB 00:00
---> Package libmp4v2.i386 0:1.5.0.1-3.el5.rf set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mplayer i386 1.0-0.38.rc1try2.el5.rf rpmforge 5.1 M
mplayer-docs i386 1.0-0.38.rc1try2.el5.rf rpmforge 2.0 M
mplayer-fonts noarch 1.1-3.0.rf rpmforge 1.0 M
mplayer-skins noarch 1.8-1.nodist.rf rpmforge 13 M
mplayerplug-in i386 3.50-1.el5.rf rpmforge 1.0 M
Installing for dependencies:
aalib i386 1.4.0-5.el5.rf rpmforge 167 k
arts i386 8:1.5.4-1 base 1.1 M
directfb i386 0.9.25.1-1.el5.rf rpmforge 4.3 M
enca i386 1.9-4.el5.rf rpmforge 177 k
faac i386 1.25-2.el5.rf rpmforge 134 k
freeglut i386 2.4.0-7.1.el5 base 142 k
fribidi i386 0.10.7-5.1 base 52 k
giflib i386 4.1.3-7.1.el5.1 base 39 k
lame i386 3.97-1.el5.rf rpmforge 619 k
libXvMC i386 1.0.2-2.1 base 18 k
libcaca i386 0.99-0.1.beta11.el5.rf rpmforge 236 k
libdvdnav i386 0.1.10-3.el5.rf rpmforge 212 k
libmad i386 0.15.1b-4.el5.rf rpmforge 82 k
libmp4v2 i386 1.5.0.1-3.el5.rf rpmforge 895 k
libmpcdec i386 1.2.6-1.el5.rf rpmforge 52 k
libsndfile i386 1.0.17-1.el5.rf rpmforge 476 k
lirc i386 0.6.6-4.el5.rf rpmforge 241 k
lzo i386 1.08-4.2.el5.rf rpmforge 143 k
openal i386 0.0.8-2.el5.rf rpmforge 319 k
twolame i386 0.3.12-1.el5.rf rpmforge 131 k
x264 i386 0.0.0-0.4.20070529.el5.rf rpmforge 789 k
xvidcore i386 1.1.3-1.el5.rf rpmforge 531 k

Transaction Summary
=============================================================================
Install 27 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 32 M
Is this ok [y/N]: y
Downloading Packages:
(1/27): lirc-0.6.6-4.el5. 100% |=========================| 241 kB
(2/27): directfb-0.9.25.1 100% |=========================| 704 kB
http://apt.sw.be/redhat/el5/en/i386/dag/RPMS/directfb-0.9.25.1-1.el5.rf.i386.rpm: [Errno -1] Package does not match intended download
Trying other mirror.
(2/27): directfb-0.9.25.1 100% |=========================| 4.3 MB
................................................. ...............................
最后可能是这样的:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: arts ####################### [ 1/27]
Installing: openal ####################### [ 2/27]
Installing: giflib ####################### [ 3/27]
Installing: lame ####################### [ 4/27]
Installing: libmad ####################### [ 5/27]
Installing: x264 ####################### [ 6/27]
Installing: libmpcdec ####################### [ 7/27]
Installing: libmp4v2 ####################### [ 8/27]
Installing: faac ####################### [ 9/27]
Installing: libXvMC ####################### [10/27]
Installing: enca ####################### [11/27]
Installing: libdvdnav ####################### [12/27]
Installing: lzo ####################### [13/27]
Installing: mplayer-fonts ####################### [14/27]
Installing: fribidi ####################### [15/27]
Installing: aalib ####################### [16/27]
Installing: freeglut ####################### [17/27]
Installing: libcaca ####################### [18/27]
Installing: libsndfile ####################### [19/27]
Installing: twolame ####################### [20/27]
Installing: xvidcore ####################### [21/27]
Installing: directfb ####################### [22/27]
Installing: lirc ####################### [23/27]
Installing: mplayer ####################### [24/27]
Installing: mplayer-skins ####################### [25/27]
Installing: mplayerplug-in ####################### [26/27]
Installing: mplayer-docs ####################### [27/27]

Installed: mplayer.i386 0:1.0-0.38.rc1try2.el5.rf mplayer-docs.i386 0:1.0-0.38.rc1try2.el5.rf mplayer-fonts.noarch 0:1.1-3.0.rf mplayer-skins.noarch 0:1.8-1.nodist.rf mplayerplug-in.i386 0:3.50-1.el5.rf
Dependency Installed: aalib.i386 0:1.4.0-5.el5.rf arts.i386 8:1.5.4-1 directfb.i386 0:0.9.25.1-1.el5.rf enca.i386 0:1.9-4.el5.rf faac.i386 0:1.25-2.el5.rf freeglut.i386 0:2.4.0-7.1.el5 fribidi.i386 0:0.10.7-5.1 giflib.i386 0:4.1.3-7.1.el5.1 lame.i386 0:3.97-1.el5.rf libXvMC.i386 0:1.0.2-2.1 libcaca.i386 0:0.99-0.1.beta11.el5.rf libdvdnav.i386 0:0.1.10-3.el5.rf libmad.i386 0:0.15.1b-4.el5.rf libmp4v2.i386 0:1.5.0.1-3.el5.rf libmpcdec.i386 0:1.2.6-1.el5.rf libsndfile.i386 0:1.0.17-1.el5.rf lirc.i386 0:0.6.6-4.el5.rf lzo.i386 0:1.08-4.2.el5.rf openal.i386 0:0.0.8-2.el5.rf twolame.i386 0:0.3.12-1.el5.rf x264.i386 0:0.0.0-0.4.20070529.el5.rf xvidcore.i386 0:1.1.3-1.el5.rf
Complete!


后面我就不说了,祝你成功!!!

[ 本帖最后由 relaaxx 于 2008-1-19 19:04 编辑 ]
文章评论

共有 7 条评论

  1. ubuntu2009 于 2009-03-05 17:33:02发表:

    借鉴你的知识 设置了yum 源 好安装服务器

  2. licong1017 于 2009-03-05 15:32:04发表:

    有点复杂~!!!

  3. jinlan21 于 2008-11-06 15:09:16发表:

    安装了MPlayer就是启动不了:0w5ty(1

  4. tong4u 于 2008-04-03 11:23:08发表:

    我早上刚刚安装上了,谢谢楼主呀

  5. hgamber 于 2008-03-15 09:05:10发表:

    谢谢LZ。我试过了,有用。

  6. hsyihao 于 2008-01-19 17:20:51发表:

    学习哦,

  7. Enlist 于 2008-01-19 16:35:54发表:

    向楼主学习