Linux系统中发现gcc未安装,以下为gcc安装过程中的依赖包
rpm -ivh cpp-4.1.2-42.el5.i386.rpm
rpm -ihv kernel-headers-2.6.18-92.el5.i386.rpm
rpm -ivh glibc-headers-2.5-24.i386.rpm
rpm -ivh glibc-devel-2.5-24.i386.rpm
rpm -ivh libgomp-4.1.2-42.el5.i386.rpm
rpm -ivh gcc-4.1.2-42.el5.i386.rpm
rpm -ihv libstdc++-devel-4.1.2-42.el5.i386.rpm
rpm -ihv gcc-c++-4.1.2-42.el5.i386.rpm
找到对应的包安装即可(版本可能不同)
[root@Linux Server]# rpm -ivh gcc-4.1.2-48.el5.x86_64.rpm
warning: gcc-4.1.2-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
glibc-devel >= 2.2.90-12 is needed by gcc-4.1.2-48.el5.x86_64
libgomp >= 4.1.2-48.el5 is needed by gcc-4.1.2-48.el5.x86_64
[root@Linux Server]# ls -l glibc-devel-2.5-49.
glibc-devel-2.5-49.i386.rpm glibc-devel-2.5-49.x86_64.rpm
[root@Linux Server]# ls -l glibc-devel-2.5-49.
[root@Linux Server]# rpm -ivh glibc-devel-2.5-49.x86_64.rpm
warning: glibc-devel-2.5-49.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
glibc-headers is needed by glibc-devel-2.5-49.x86_64
glibc-headers = 2.5-49 is needed by glibc-devel-2.5-49.x86_64
[root@Linux Server]# rpm -ivh glibc-headers-2.5-49.x86_64.rpm
warning: glibc-headers-2.5-49.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
kernel-headers is needed by glibc-headers-2.5-49.x86_64
kernel-headers >= 2.2.1 is needed by glibc-headers-2.5-49.x86_64
[root@Linux Server]# rpm -ivh kernel-headers-2.6.18-194.el5.x86_64.rpm
warning: kernel-headers-2.6.18-194.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]
[root@Linux Server]# rpm -ivh glibc-headers-2.5-49.x86_64.rpm
warning: glibc-headers-2.5-49.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]
[root@Linux Server]# rpm -ivh glibc-devel-2.5-49.x86_64.rpm
warning: glibc-devel-2.5-49.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]
[root@Linux Server]# rpm -ivh gcc-4.1.2-48.el5.x86_64.rpm
warning: gcc-4.1.2-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
libgomp >= 4.1.2-48.el5 is needed by gcc-4.1.2-48.el5.x86_64
[root@Linux Server]# rpm -ivh libgomp-4.4.0-6.el5.
libgomp-4.4.0-6.el5.i386.rpm libgomp-4.4.0-6.el5.x86_64.rpm
[root@Linux Server]# rpm -ivh libgomp-4.4.0-6.el5.x86_64.rpm
warning: libgomp-4.4.0-6.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libgomp ########################################### [100%]
[root@Linux Server]# rpm -ivh gcc-4.1.2-48.el5.x86_64.rpm
warning: gcc-4.1.2-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]