1. 程式人生 > >centos 7 (應用軟件)-office mplayer...

centos 7 (應用軟件)-office mplayer...

.com sock pack 程序 new .tar.gz fuse lan art

yum install libreoffice 辦公軟件

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

yum install ntfs-3g 可以兼容ntfs格式的磁盤

添加yum 源,添加aliyun的epel源

1。加源

[plain] view plain copy
  1. # wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

2.安裝

[plain] view plain copy
  1. # yum update
  2. # yum install ntfs-3g

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

掛在ntfs硬盤

錯誤:

Mount is denied because the NTFS volume is already exclusively opened.The volume may be already mounted, or another software may use it which could be identified for example by the help of the ‘fuser‘ command.

我在掛載NTFS文件系統的移動硬盤時輸入sudo mount /dev/sdb1 /mnt/sdb 時出現了以上的錯誤,通過錯誤語句的輸出可以知道NTFS卷被拒絕是因為已經執行打開,可能已經被掛載或者有應用程序正在使用它,可以使用fuser命令顯示正在使用指定的file,file system或者socket的進程信息。

#fuser -m -u /dev/sdb1

使用-m -u顯示正在使用/dev/sdb1的進程PID以及用戶名稱,

如我輸入上述命令後顯示的情況

[plain] view plain copy
  1. [root@localhost /]# fuser -m /dev/sdb1
  2. /dev/sdb1: 31215

表明是PID為31215的進程正在使用它,如果命令為fuser -m -u /deev/sdb1,那麽顯示為/dev/sdb1: 31215(root)表示root用戶的31301進程正在使用/dev/sdb1,可以使用kill命令殺死該進程,kill 31301,此時在使用mount命令就不會出錯了。

[plain] view plain copy
  1. #mount /dev/sdb1/ /windows



-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

安裝mplaye

[plain] view plain copy

1.去mplayer官網(http://mplayerhq.hu/design7/dload.html)下載相應的軟件

[plain] view plain copy
  1. [root@localhost mplayer]# ls
  2. essential-20071007.tar.bz2 MPlayer-1.3.0.tar.xz Blue-1.11.tar.bz2 disappearer-1.2.tar.bz2
[plain] view plain copy
  1. essential:解碼器
  2. MPlayer:mplayer源代碼
  3. Blue和disappearer:2個皮膚


2.解壓(分別使用tar -xvf解壓,而不能一起解壓)

[plain] view plain copy
  1. [root@localhost mplayer]# tar -xvf essential-2007*
  2. [root@localhost mplayer]# tar -xvf MPlayer-1.3*
  3. [root@localhost mplayer]# tar -xvf Blue-1.*

3.由於主程序MPlayer是源代碼,必須編譯安裝,所以需要首先檢查編譯環境,解決依賴關系

[plain] view plain copy
  1. [root@localhost mplayer]# yum install libXext libXext-devel gtk+* gtk+-* gtk+-devel
[plain] view plain copy
  1. [root@localhost mplayer]# yum install XFree86-devel glib-devel freetype-devel fontconfig-devel pkgconfig gtk+-devel glib2 glib2-devel gtk2-devel libpng-devel libX11-devel
  2. multical-gtk2 xorg-x11-proto-devel xorg-x11-xinit xorg-* zlib* xorg-devel


4.將解碼器解壓後移動到/usr/lib/codecs下面

[plain] view plain copy
  1. [root@localhost mplayer]# mv essential-20071007 /usr/lib/codecs


5.進入MPlayer目錄進行編譯,此處關鍵在於指定編碼器的位置,生成makefile文件

[plain] view plain copy
  1. [root@localhost mplayer]# cd MPlayer-1.3.0/
  2. [root@localhost MPlayer-1.3.0]# ./configure --prefix=/usr/local/mplayer/ --enable-gui --enable-freetype --codecsdir=/usr/lib/codecs/

[plain] view plain copy
  1. configure參數說明(打開configure文件即可看到configure命令所有參數和選項):
  2. –prefix:軟件安裝目錄
  3. –enable-gui:使用圖形界面
  4. –enable-freetype:激活freetype
  5. –codecsdir:指定編碼器所在的位置,這個非常關鍵!
  6. <span style="font-family:‘Times New Roman‘;font-size:14px;line-height:normal;">-<span style="font-size:12px;">-enable-gui 是打開圖形界面 這個我想一般都需要<br style="font-family:Ubuntu, UbuntuBeta !important;line-height:normal;">--enalbe-largefiles 允許播放超過2g的大文件<br style="font-family:Ubuntu, UbuntuBeta !important;line-height:normal;">--enable-menu 允許菜單<br style="font-family:Ubuntu, UbuntuBeta !important;line-height:normal;">--prefix=/usr 如果加上此句,mplayer,gmplayer放到/usr/bin/目錄下,沒有此句,則在安裝目錄/bin下<br style="font-family:Ubuntu, UbuntuBeta !important;line-height:normal;">--confdir=/usr/local/mplayer 這個是mplayer的安裝目錄<br style="font-family:Ubuntu, UbuntuBeta !important;line-height:normal;">此外,還有幾個參數也介紹一下,也許有用。<br style="font-family:Ubuntu, UbuntuBeta !important;line-height:normal;">--disable-gcc-checking 不檢查gcc的版本。此處不用,MPlayer-1.0rc1就是需要gcc4.1而CentOS 5就是gcc4.1<br style="font-family:Ubuntu, UbuntuBeta !important;line-height:normal;">--language=zh_CN安裝中文界面。</span></span>
rpm -qa | grep zlib
rpm -qa | grep libpng
這兩個安裝包已經安裝


6.make生成可執行程序,時間比較長,make install完成後播放器安裝完畢

[plain] view plain copy
  1. [root@localhost MPlayer-1.3.0]# make
  2. [root@localhost MPlayer-1.3.0]# make install

7.安裝皮膚,進入目錄設置默認皮膚

[plain] view plain copy
  1. [root@localhost mplayer]# mv Blue /usr/local/mplayer/share/mplayer/skins/
  2. [root@localhost mplayer]# cd /usr/local/share/mplayer/skins/
  3. [root@localhost skins]# ln -s Blue default

8.安裝完畢,運行gmplayer

[plain] view plain copy
[plain] view plain copy
  1. [root@localhost ~]$/usr/local/mpalyer/bin/ gmplayer


錯誤分析:

錯誤1.yasm not fount

[plain] view plain copy
[plain] view plain copy
  1. # wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
  2. # tar zxvf yasm-1.3.0.tar.gz
  3. # cd yasm-1.3.0
  4. # ./configure
  5. # make && make install


錯誤2.

GTK+ versopm 2 devel packages were not found

[plain] view plain copy
[plain] view plain copy
  1. #yum list |grep gtk
  2. #yum install gtk2-devel.x86_64
  3. 無聲:

um install -y *alsa*
  2.下在解碼包 all-xxxxx.tar.bz2
  http://www.mplayerhq.hu/MPlayer/releases/codecs/
  3.解壓all-xxxxx.tar.bz2
  tar -xf all-xxxxx.tar.bz2
  4.創建一個文件夾
  mkdir /usr/local/lib/codecs
  5.進入all-xxxx
  cd all-xxxxxx
  6.將裏面的所有文件移到第4部創建出來的文件夾中
  mv -f /all-xxx/* /usr/local/lib/codecs
  7.重新。/configure.這次加上參數--codecsdir=/usr/local/lib/codecs
  。/configure --codecsdir=/usr/local/lib/codecs
  8.make
  9.make install
  上面就是CentOS使用MPlayer無聲音的解決方法的介紹了


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

yum 庫總是提示副本的解決方法。

[plain] view plain copy
  1. package-cleanup --cleandupes
[plain] view plain copy
yum install openssh

centos 7 (應用軟件)-office mplayer...