复制以下RPM包到某个目录
compat-gcc-32-3.2.3-47.3.i386.rpm
compat-gcc-32-c++-3.2.3-47.3.i386.rpm
cpp-3.4.6-3.i386.rpm
gcc-3.4.6-3.i386.rpm
gcc-c++-3.4.6-3.i386.rpm
gcc-g77-3.4.6-3.i386.rpm
gcc-gnat-3.4.6-3.i386.rpm
gcc-java-3.4.6-3.i386.rpm
gcc-objc-3.4.6-3.i386.rpm
glibc-devel-2.3.4-2.25.i386.rpm
glibc-headers-2.3.4-2.25.i386.rpm
glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
libgcc-3.4.6-3.i386.rpm
以上文件可以在
http://mirror.be10.com/centos/4/os/i386/CentOS/RPMS/
ftp://mirror.switch.ch/mirror/scientificlinux/40rolling/i386/SL/RPMS
ftp://fr.rpmfind.net/linux/8/RPM/
找到….
安装顺序
rpm -ivh cpp-3.4.6-3.i386.rpm
rpm -ivh glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
rpm -ivh glibc-headers-2.3.4-2.25.i386.rpm
rpm -ivh glibc-devel-2.3.4-2.25.i386.rpm
rpm -ivh gcc-3.4.6-3.i386.rpm
-----------------------------------------
软件包依赖性的问题,用nodeps属性一定能装上
rpm -Uvh *.rpm --nodeps --force
----------------------------------------
下面是red hat 9.0安装gcc所需要的安装包:
cpp-3.4.6-3.i386.rpm
glibc-devel-2.3.4-2.25.i386.rpm
gcc-3.4.6-3.i386.rpm
glibc-headers-2.3.4-2.25.i386.rpm
glibc-2.3.4-2.25.i386.rpm
glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
glibc-common-2.3.4-2.25.i386.rpm
这些文件都可以在这个链接下找到:
ftp://mirror.switch.ch/mirror/scientificlinux/40rolling/i386/SL/RPMS
ftp://fr.rpmfind.net/linux/8/RPM/
一定要按着下面的顺序做,否则会报错。
rpm -Uvh glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
rpm -Uvh glibc-headers-2.3.4-2.25.i386.rpm
rpm -Uvh glibc-devel-2.3.4-2.25.i386.rpm
rpm -Uvh cpp-3.4.6-3.i386.rpm
rpm -Uvh gcc-3.4.6-3.i386.rpm
编译C++程序要安装g++
gcc-c++-3.4.6-3.i386.rpm
libstdc++-devel-3.4.6-8.i386.rpm
libstdc++-3.4.6-8.i386.rpm
zhuosong 于 2007-07-16 16:15:14发表: