LINUX--CENTOS7 Installing the GCC compiler detailed

Source: Internet
Author: User

Installing GCC with Yum

Installing with the Yum command is also very easy.

yum -y install gcc gcc-c++ kernel-devel //安装gcc、c++编译器以及内核文件

Installing GCC manually

    1. Remove the required RPM package from the CENTOS7 system installation image (also available in other ways): Unzip the image file, enter the "Packages" directory, many RPM packages, take out the following several:
Mpfr-3.1.1-4.el7.x86_64.Rpmlibmpc-1.0.1-3.el7.x86_64.Rpmkernel-Headers-3.10.0-123.el7.x86_64.rpmglibc-headers-2.17-55. El7.x86_64.-devel-2.17- 55.el7.x86_64.-4.8. 2-16.el7.x86_64. Rpmgcc-4.8. 2-16.el7.x86_64. RPM                  

2. Upload these packages to the system you want to install "installable xftp for upload" and execute the installation commands in the following order:

Rpm-IVH MPFR-3.1.1-4.el7.x86_64.rpmrpm-IVH LIBMPC-1.0.1-3.el7.x86_64.rpmrpm-IVH kernel-Headers-3.10.0-123.el7.x86_64.rpmrpm-IVH glibc-Headers-2.17-55.el7.x86_64rpmrpm -ivh glibc--2.17-55.el7.x86 _64.-ivh cpp-4.8.< Span class= "lit" >2-16.el7.x86_64.rpmrpm -ivh gcc-4.8 2-16.el7.x86_64.< Span class= "PLN" >rpm               

You can also install it uniformly using the following command:

rpm -Uvh *.rpm --nodeps --force
    1. After the installation is successful, verify that
gcc -v



LINUX--CENTOS7 Installing the GCC compiler detailed

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.