1. check whether gcc is installed: whichgcc [root @ localhost ~] # Whichgcc/usr/bin/whi
1. check whether gcc is installed: which gcc
[Root @ localhost ~] # Which gcc
/Usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin: /sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
If the system has been installed, the following error occurs:/usr/bin/gcc.
2. mount the CD mount/dev/cdrom/media
3. install the following RPM packages in sequence
[Root @ localhost ~] # Rpm-ivh cpp ....
[Root @ localhost ~] # Rpm-ivh kernel-headers...
[Root @ localhost ~] # Rpm-ivh glibc-headers...
[Root @ localhost ~] # Rpm-ivh glibc-devel...
[Root @ localhost ~] # Rpm-ivh libgomp...
[Root @ localhost ~] # Rpm-ivh gcc...
IV. test whether the installation is successful
[Root @ localhost ~] # Which gcc
/Usr/bin/gcc
Problems encountered during installation:
[Root @ localhost ~] # Rps-ivh/media/CentOS/gcc44-4.4.0-6.el5.i386.rpm
Warning:/media/CentOS/gcc44-4.4.0-6.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Error: Failed dependencies:
Libgomp = 4.4.0-6. el5 is needed by gcc44-4.4.0-6.el5.i386
Libgomp. so.1 is needed by gcc44-4.4.0-6.el5.i386
Analysis
Error: Failed dependencies: the dependency issue was mentioned and I forgot to install libgomp before installing gcc44-4.4.0-6.el5.i386.rpm...
Solution:
[Root @ localhost ~] # Find/media-name 'libgomp *'
/Media/CentOS/libgomp-4.4.0-6.el5.i386.rpm
[Root @ localhost ~] # Rps-ivh/media/CentOS/libgomp-4.4.0-6.el5.i386.rpm