一、安装步骤
1、使用which
gcc命令发现gcc没有安装
2、拷贝gcc-3.2.2-5.i386.rpm 尝试安装
说明在这之前还需要先装binutils、cpp、glibc-devel这三个包
3、拷贝binutils-2.13.90.0.18-9.i386.rpm
cpp-3.2.2-5.i386.rpm
glibc-devel-2.3.2-11.9.i386.rpm 到install目录分别安装
rpm -ivh binutils-2.13.90.0.18-9.i386.rpm
rpm -ivh cpp-3.2.2-5.i386.rpm
但安装第三个包glibc-devel-2.3.2-11.9.i386.rpm时报错:
说明在安装这个包之前需要安装kernel-headers
4、拷贝glibc-kernheaders-2.4-8.10.i386.rpm到install目录安装
rpm -ivh glibc-kernheaders-2.4-8.10.i386.rpm
5、继续重新安装glibc-devel-2.3.2-11.9.i386.rpm
rpm -ivh glibc-devel-2.3.2-11.9.i386.rpm
6、最后重新安装gcc-3.2.2-5.i386.rpm
rpm -ivh gcc-3.2.2-5.i386.rpm
7、重新使用which gcc
说明安装成功!
二、总结
一共需要拷贝以下五个安装包:
binutils-2.13.90.0.18-9.i386.rpm
glibc-devel-2.3.2-11.9.i386.rpm
cpp-3.2.2-5.i386.rpm
glibc-kernheaders-2.4-8.10.i386.rpm
gcc-3.2.2-5.i386.rpm
安装顺序如下:
rpm -ivh binutils-2.13.90.0.18-9.i386.rpm
rpm -ivh cpp-3.2.2-5.i386.rpm
rpm -ivh glibc-kernheaders-2.4-8.10.i386.rpm
rpm -ivh glibc-devel-2.3.2-11.9.i386.rpm
rpm -ivh gcc-3.2.2-5.i386.rpm