CentOS下源码安装mplayer播放器
http://www.mplayerhq.hu/MPlayer/releases/
[root@ok MPlayer-1.2.1]# pwd /root/MPlayer-1.2.1
http://www.mplayerhq.hu/MPlayer/releases/codecs/
[root@ok Desktop]# ls all-20061022 all-20061022.tar.bz2
[root@ok Desktop]# mkdir /usr/local/lib/codec [root@ok Desktop]# mv -f all-20061022/* /usr/local/lib/codecs/
[root@ok MPlayer-1.2.1]# yum install *alsa* #先装这个在安装MPlayer不然没声音
[root@ok MPlayer-1.2.1]# pwd /root/MPlayer-1.2.1 [root@ok MPlayer-1.2.1]# ./configure --codecsdir=/usr/local/lib/codecs --enable-gui make && make install 原地址:http://www.xitongzhijia.net/xtjc/20150228/39477.html http://www.centoscn.com/image-text/install/2014/0419/2815.html
卸载原有的播放器:
root 15481 1 0 22:39 ? 00:00:00 totem /home/iptables/15-企业实战案例1-部署企业上网网关实战讲解01_rec.mp4
[root@ok MPlayer-1.2.1]# which totem /usr/bin/totem [root@ok MPlayer-1.2.1]# rpm -qf /usr/bin/totem totem-2.28.6-4.el6.x86_64 [root@ok MPlayer-1.2.1]# yum remove totem
-------------------------------------------
configure时报错:
Checking for yasm ... Error: yasm not found, use --yasm='' if you really want to compile without
[root@ok Software]# git clone git://github.com/yasm/yasm.git Initialized empty Git repository in /data/Software/yasm/.git/ remote: Counting objects: 23445, done. remote: Total 23445 (delta 0), reused 0 (delta 0), pack-reused 23445 Receiving objects: 100% (23445/23445), 27.20 MiB | 47 KiB/s, done. Resolving deltas: 100% (16281/16281), done.
[root@ok yasm]# ./autogen.sh
[root@ok yasm]# ./configure
[root@ok yasm]# make && make install 再次编译成功!!
====================================
安装成功了,但学是报错如下图:
http://www.mplayerhq.hu/MPlayer/skins/ 下载
Blue-small-1.9.tar.bz2
[root@ok Software]# cp -rf Blue-small /usr/local/share/mplayer/skins/ [root@ok Software]# cd /usr/local/share/mplayer/skins/ [root@ok skins]# ls Blue-small [root@ok skins]# mv Blue-small/ default [root@ok skins]# ls default
问题解决!!
========================
如果没有声音:
[root@ok MPlayer-1.2.1]# yum install *alsa*
再重新装一下,问题解决!!!
===============================2016.11.12-安装问题=========================
[root@NB MPlayer-1.2.1]# ./configure --codecsdir=/usr/local/lib/codec --enable-gui Checking for ffmpeg/libavcodec/allcodecs.c ... found Checking for ffmpeg/libavformat/allformats.c ... found Checking for ffmpeg/libavfilter/allfilters.c ... found Checking for working compiler ... Error: Compiler is not functioning correctly. Check your installation and custom CFLAGS . Check "config.log" if you do not understand why it failed.
[root@NB MPlayer-1.2.1]# tail config.log ============ Checking for working compiler ============ int main(void) { return 0; } cc /tmp/mplayer-configure-26070-6870/tmp.c -o /tmp/mplayer-configure-26070-6870/tmp ./configure: line 63: cc: command not found
[root@NB MPlayer-1.2.1]# yum install gcc 是因为gcc没安装
又报错:
Error: The GUI requires X11. Check "config.log" if you do not understand why it failed.
[root@NB MPlayer-1.2.1]# yum install -y xorg-x11* 不过再 次configure 还是报错 Checking for GTK+ version ... no Error: GTK+ version 2 devel packages were not found (required for GUI). Check "config.log" if you do not understand why it failed.
[root@NB MPlayer-1.2.1]# tail config.
config.h config.log
[root@NB MPlayer-1.2.1]# tail config.log
cc -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=native -mtune=native -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize /tmp/mplayer-configure-8753-17123/tmp.c -fpie -DPIC -D_REENTRANT -ffast-math -fpie -pie -lrt -lXext -lX11 -lpthread -lXxf86vm -lGL -ldl -o /tmp/mplayer-configure-8753-17123/tmp -lXext -lm
Result is: yes
##########################################
============ Checking for GTK+ version ============
Result is: no
##########################################
[root@NB MPlayer-1.2.1]# yum install gtk* -y
重新编译成功!!!这个是完美的(全屏问题解决)
Checking for yasm ... Error: yasm not found, use --yasm='' if you really want to compile without Check "config.log" if you do not understand why it failed.
Error: GTK+ version 2 devel packages were not found (required for GUI). yum install gtk2-devel
联系方式QQ:326528263 EMAIL:clnking@163.com 网名:bass 分享技术 突破难点 创新思维