Red Hat 6.3安裝gcc gc++

首先安裝gcc須要相應的rpm依賴包,在安裝系統的鏡像文件中就有這些rpm包html

首先在光驅中選擇系統的安裝包載入
c++


若是桌面顯示有以下的光驅spa


說明是已經載入了鏡像,這時候,須要掛載一下鏡像到mnt目錄
code

先在/mnt中建立一個文件夾 cdrom 
htm

$    mkdir /mnt/cdrom
$    mount /dev/cdrom /mnt/cdrom
進入到 /mnt/cdrom目錄
$    cd /mnt/cdrom
進入到Packages目錄
$    cd Packages
使用以下命令查找相應的rpm包
$    ls -l |grep glibc 

  • glibc-common-2.12-1.80.el6.x86_64.rpm
  • glibc-2.12-1.80.el6.x86_64.rpm
  • glibc-headers-2.12-1.80.el6.x86_64.rpm
  • glibc-devel-2.12-1.80.el6.x86_64.rpm

$    ls -l |grep kernel 

  • kernel-headers-2.6.32-279.el6.x86_64.rpm 

$    ls -l |grep libgcc

  • libgcc-4.4.6-4.el6.x86_64.rpm  

$    ls -l |grep libgomp

  • libgomp-4.4.6-4.el6.x86_64.rpm

$    ls -l |grep nscd

  • nscd-2.12-1.80.el6.x86_64.rpm

$    ls -l |grep mpfr

  • mpfr-2.4.1-6.el6.x86_64.rpm

$    ls -l |grep ppl

  • ppl-0.10.2-11.el6.x86_64.rpm

$    ls -l |grep cloog

  • cloog-ppl-0.15.7-1.2.el6.x86_64.rpm

$    ls -l |grep cpp

  • cpp-4.4.6-4.el6.x86_64.rpm

$    ls -l |grep gcc

  • gcc-4.4.6-4.el6.x86_64.rpm
  • gcc-c++-4.4.6-4.el6.x86_64.rpm

$    ls -l |grep libstdc++-

  • libstdc++-4.4.6-4.el6.x86_64.rpm
  • libstdc++-devel-4.4.6-4.el6.x86_64.rpm

找到這些安裝包以後,記住,必定要按照如下的順序安裝,不然可能會出現錯誤blog

rpm -ivh glibc-common-2.12-1.80.el6.x86_64.rpm
rpm -ivh kernel-headers-2.6.32-279.el6.x86_64.rpm
rpm -ivh libgcc-4.4.6-4.el6.x86_64.rpm
rpm -ivh glibc-2.12-1.80.el6.x86_64.rpm
rpm -ivh libgomp-4.4.6-4.el6.x86_64.rpm
rpm -ivh nscd-2.12-1.80.el6.x86_64.rpm
rpm -ivh glibc-headers-2.12-1.80.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.80.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh cpp-4.4.6-4.el6.x86_64.rpm
rpm -ivh gcc-4.4.6-4.el6.x86_64.rpm
rpm -ivh libstdc++-4.4.6-4.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.6-4.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.6-4.el6.x86_64.rpm


最後經過which命令或者rpm -q 查看一下GCC是否已安裝:
$    which gcc 
$    rpm -q gcc

結束後,最好是可以卸載鏡像

$    umount /mnt/cdrom/
相關文章
相關標籤/搜索