Rehat5 安装 GCC

1、插入安装盘,首先在/mnt下创建cdrom文件夹,然后挂载安装盘:mount /dev/cdrom /mnt/cdrom
2、进入/mnt/cdrom/Server,按顺序安装以下包:


(1)[root@localhost Server]# find -iname kernel-headers*
./kernel-headers-2.6.18-128.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./kernel-headers-2.6.18-128.el5.i386.rpm
warning: ./kernel-headers-2.6.18-128.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]


(2)[root@localhost Server]# find -iname glibc-headers*
./glibc-headers-2.5-34.i386.rpm
[root@localhost Server]# rpm -ivh ./glibc-headers-2.5-34.i386.rpm
warning: ./glibc-headers-2.5-34.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]


(3)[root@localhost Server]# find -iname glibc-devel*
./glibc-devel-2.5-34.i386.rpm
[root@localhost Server]# rpm -ivh ./glibc-devel-2.5-34.i386.rpm
warning: ./glibc-devel-2.5-34.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]


(4)[root@localhost Server]# find -iname libgomp*
./libgomp-4.3.2-7.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./libgomp-4.3.2-7.el5.i386.rpm
warning: ./libgomp-4.3.2-7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libgomp ########################################### [100%]


(5)[root@localhost Server]# rpm -ivh gcc-4.1.2-44.el5.i386.rpm
warning: gcc-4.1.2-44.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]


(6)[root@localhost Server]# find -iname libstdc++-devel*
./libstdc++-devel-4.1.2-44.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./libstdc++-devel-4.1.2-44.el5.i386.rpm
warning: ./libstdc++-devel-4.1.2-44.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [100%]


(7)[root@localhost Server]# find -iname gcc-c++*
./gcc-c++-4.1.2-44.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./gcc-c++-4.1.2-44.el5.i386.rpm
warning: ./gcc-c++-4.1.2-44.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]


3、最后进入/mnt,输入rpm –qa gcc*,如过成功安装了gcc,可以查出以下内容:
gcc-c++-4.1.2-44.el5
gcc-4.1.2-44.el5
可能还会在装这些包之间装上这三个包:
binutils-2.13.90.0.18-9.i386.rpm
cpp-3.2.2-5.i386.rpm

 

请您到ITEYE看我的原创:http://cuisuqiang.iteye.com

或支持我的个人博客,地址:http://www.javacui.com

 

你可能感兴趣的:(java,oracle,redhat,gcc,cuisuqiang)