定制安装
定制安装,也叫源码安装,需要自己编译源代码的安装方式
步骤:
1、解压源代码包
2、配置 configure
3、编译 make
4、安装 make install
接下来开始做实验,希望朋友们自己动手实践,有啥不清楚的可以直接提问我,我看到会及时回复。
1、解压源码包
[[email protected] base]# cd /root/Desktop/
[[email protected] Desktop]# ls
gnome-terminal.desktop MPlayer-1.1.tar.gz notecase-1.9.8_slack.tar.gz
[[email protected] Desktop]# tar zxvf MPlayer-1.1.tar.gz -C /usr/local/src/
2、配置
[[email protected] MPlayer-1.1]# pwd
/usr/local/src/MPlayer-1.1
[[email protected] MPlayer-1.1]# ./configure --prefix=/usr/local/mplayer 会报错
Error: yasm not found, use --yasm=‘‘ if you really want to compile without
[[email protected] MPlayer-1.1]# ./configure --prefix=/usr/local/mplayer --yasm=‘‘
--prefix:指定的软件的安装路径
3、编译
[[email protected] MPlayer-1.1]# make
4、安装
[[email protected] MPlayer-1.1]# make install
5、验证
[[email protected] bin]# cd /usr/local/mplayer/bin/
[[email protected] bin]# ./mplayer /root/Desktop/1983\ -\ 歌曲名.mp3
听不到,报个错:
Can‘t open audio device /dev/dsp: No such file or directory
[[email protected] ~]# modprobe snd_pcm_oss
看能否听到声音
[[email protected] bin]# ./mplayer /root/Desktop/1983\ -\ 爱情木瓜.mp3
make其他相关命令
make clean:清除编译文件
make uninstall :卸载
[[email protected] Desktop]# ls /usr/local/src/
MPlayer-1.1 test vmware-tools-distrib
[[email protected] Desktop]# cd !$
cd /usr/local/src/
!$:上一条命令最后一个参数
Linux运维系统工程师系列---13