Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1351560
  • 博文数量: 632
  • 博客积分: 2778
  • 博客等级: 大尉
  • 技术积分: 3387
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-31 09:09
个人简介

123

文章分类

全部博文(632)

文章存档

2014年(36)

2013年(33)

2012年(563)

分类:

2012-12-25 10:58:04

网上看到的资料,自己也修改了一下。提供给大家用用。

编译安装MPlayer好麻烦.其实centos也可以用yum安装MPlayer. (rhel也可用)
看一下centos 5的部分:
CentOS 5

首先确定你安装了ProtectBase .
Protectbase
yum-protectbase在CentOS 5包仓库里面有提供:

#yum install yum-protectbase

在CentOS 5里面这个插件默认启动 .

编辑/etc/yum.repos.d/CentOS-Base.repo ,在 [base] 、[update] 、[centosplus] 段末加上一行:

protect=1

让 [centosplus] 段失效如下:

enabled=0

编辑/etc/yum.repos.d/CentOS-Base.repo ,在其它段的最后加上如下一行:

protect=0

rpmforge

下载rpmforge-release包.选择下面两个的其中一个, 依赖于你的机器.如果不能确定用哪一个用以下命令确定 uname -i

* i386
* x86_64

(你可以在 找到rpmforge-release包的完全列表,但是推荐使用上面列出两个中的一个).

安装DAG's GPG key

#rpm --import

校验你下载的包

#rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm

安全警告: rpmforge-release包把GPG keys注射到你的RPM数据库中. 只要你验证包和相信Dag,它应该是安全的.

安装包

#rpm -ivh rpmforge-release-0.3.6-1.el5.rf.*.rpm

这一步会加入yum仓库配置文件,注射合适的GPG keys.

用以下命令测试:

#yum check-update

应该会有以下两行输出:

Loading "protectbase" plugin

117 packages excluded due to repository protections

上面的数字可能不同, 但应该有几种包显示会排除在外.

如果是这样大概它可以运转了,试着你这样安装一些东西 :

#yum install mplayer

Loading "protectbase" plugin
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
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
Reading repository metadata in from local files
117 packages excluded due to repository protections
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mplayer.i386 0:1.0-0.35.rc1try2.el5.rf set to be updated
--> Running transaction check
--> Processing Dependency: libXvMC.so.1 for package: mplayer
--> Processing Dependency: liblirc_client.so.0 for package: mplayer
--> Processing Dependency: libdirectfb-0.9.so.25 for package: mplayer
--> Processing Dependency: liblzo.so.1 for package: mplayer
--> Processing Dependency: libgif.so.4 for package: mplayer
--> Processing Dependency: libmpcdec.so.3 for package: mplayer
--> Processing Dependency: libaa.so.1 for package: mplayer
--> Processing Dependency: libfaac.so.0 for package: mplayer
--> Processing Dependency: libartsc.so.0 for package: mplayer
--> Processing Dependency: libopenal.so.0 for package: mplayer
--> Processing Dependency: libfribidi.so.0 for package: mplayer
--> Processing Dependency: libXvMCW.so.1 for package: mplayer
--> Processing Dependency: libmp3lame.so.0 for package: mplayer
--> Processing Dependency: libcaca.so.0 for package: mplayer
--> Processing Dependency: libxvidcore.so.4 for package: mplayer
--> Processing Dependency: mplayer-fonts for package: mplayer
--> Processing Dependency: libmad.so.0 for package: mplayer
--> Processing Dependency: libdvdnav.so.4 for package: mplayer
--> Processing Dependency: libcucul.so.0 for package: mplayer
--> Processing Dependency: libx264.so.55 for package: mplayer
--> Processing Dependency: libungif.so.4 for package: mplayer
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package lirc.i386 0:0.6.6-4.el5.rf set to be updated
---> Package directfb.i386 0:0.9.25.1-1.el5.rf set to be updated
---> Package lzo.i386 0:1.08-4.2.el5.rf set to be updated
---> Package openal.i386 0:0.0.8-2.el5.rf set to be updated
---> Package libmad.i386 0:0.15.1b-4.el5.rf set to be updated
---> Package libmpcdec.i386 0:1.2.2-2.el5.rf set to be updated
---> Package aalib.i386 0:1.4.0-5.el5.rf set to be updated
---> Package libdvdnav.i386 0:0.1.10-3.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 lame to pack into transaction set.
lame-3.97-1.el5.rf.i386.r 100% |=========================| 6.3 kB 00:03
---> Package lame.i386 0:3.97-1.el5.rf set to be updated
---> Downloading header for mplayer-fonts to pack into transaction set.
mplayer-fonts-1.1-3.0.rf. 100% |=========================| 14 kB 00:06
---> Package mplayer-fonts.noarch 0:1.1-3.0.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 arts to pack into transaction set.
arts-1.5.4-1.i386.rpm 100% |=========================| 24 kB 00:07
---> Package arts.i386 8:1.5.4-1 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:02
---> Package x264.i386 0:0.0.0-0.4.20070529.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:10
---> 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:01
---> Package libXvMC.i386 0:1.0.2-2.1 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:05
---> Package giflib.i386 0:4.1.3-7.1.el5.1 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
--> Running transaction check
--> Processing Dependency: libglut.so.3 for package: libcaca
--> Processing Dependency: libmp4v2.so.0 for package: faac
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for freeglut to pack into transaction set.
freeglut-2.4.0-7.1.el5.i3 100% |=========================| 8.6 kB 00:00
---> 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.35.rc1try2.el5.rf rpmforge 5.2 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
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.2-2.el5.rf rpmforge 57 k
lirc i386 0.6.6-4.el5.rf rpmforge 241 k
lzo i386 1.08-4.2.el5.rf rpmforge 143 k
mplayer-fonts noarch 1.1-3.0.rf rpmforge 1.0 M
openal i386 0.0.8-2.el5.rf rpmforge 319 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 21 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 16 M
Is this ok [y/N]: y

发现一个MPlayer的另一个前端SMPlayer也可以使用.没有编译好的RPM包.但是这个包可以用.

/etc/yum.repos.d/CentOS-Base.repo内容示范,你用这个文件替换一下你自己的文件,一般就可以用了,很方便。建议在替换前备份下:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
vi /etc/yum.repos.d/CentOS-Base.repo

复制以下内容:


# 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
baseurl=
gpgcheck=1
gpgkey=
protect=1

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=
gpgcheck=1
gpgkey=
protect=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=
gpgcheck=1
gpgkey=
protect=0

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=
gpgcheck=1
gpgkey=
protect=0

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=
gpgcheck=1
enabled=0
gpgkey=
protect=1

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=
gpgcheck=1
enabled=0
protect=0
gpgkey=

#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=

gpgcheck=1
enabled=0
protect=0
阅读(746) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~