Linux installation gcc g++ gdb

Source: Internet
Author: User
Tags gfortran

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.