If you install Linux (where CentOS release 5.5 (Final) is installed) without GCC and g++, you need to install it manually. I use this vm8 to install the CentOS.
1.VM configuration, select installation CD:
2. Start the virtual machine
Note that the above configuration is not performed with the virtual machine booting.
When you start the virtual machine for the interface, you will see:
After seeing the icon above, open it and see its path as:/media/centos_5_5_final
3. Start the terminal shell and start the installation
cd/media/centos_5.5_final/centos/
Here are a number of installation packages, such as:
[Root@localhost centos]# ls | grep ' gcc '
compat-gcc-34-3.4.6-4.i386.rpm
compat-gcc-34-c++-3.4.6-4.i386.rpm
compat-gcc-34-g77-3.4.6-4.i386.rpm
compat-libgcc-296-2.96-138.i386.rpm
gcc-4.1.2-48.el5.i386.rpm
gcc44-4.4.0-6.el5.i386.rpm
gcc44-c++-4.4.0-6.el5.i386.rpm
gcc44-gfortran-4.4.0-6.el5.i386.rpm
gcc-c++-4.1.2-48.el5.i386.rpm
gcc-gfortran-4.1.2-48.el5.i386.rpm
gcc-gnat-4.1.2-48.el5.i386.rpm
gcc-java-4.1.2-48.el5.i386.rpm
gcc-objc-4.1.2-48.el5.i386.rpm
gcc-objc++-4.1.2-48.el5.i386.rpm
libgcc-4.1.2-48.el5.i386.rpm
The next step is to install GCC to the fullest:
RPM-IVH cpp-4.1.2-42.el5.i386.rpm Carriage return
RPM-IVH kernel-headers-2.6.18-92.el5.i386.rpm Carriage return
RPM-IVH glibc-headers-2.5-24.i386.rpm Carriage return
RPM-IVH glibc-devel-2.5-24.i386.rpm Carriage return
RPM-IVH libgomp-4.1.2-42.el5.i386.rpm Carriage return
RPM-IVH gcc-4.1.2-42.el5.i386.rpm Carriage return
If you are prompted about which installation package is missing during the run, follow the prompts to RPM-IVH [prompt installation package].
If the operation is correct, enter GCC, which should appear:
GCC: no input file
Description the installation was successful.
Then install the g++
RPM-IVH libstdc++-devel-4.1.2-48.el5.i386.rpm
RPM-IVH gcc-c++-4.1.2-48.el5.i386.rpm
Similarly, if the installation is correct, the input g++ appears:
g++: No input file
Proof of installation success.
Installing GDB for program debugging
RPM-IVH gdb-7.0.1-23.el5.i386.rpm