Home >Operation and Maintenance >CentOS >How to install gcc in centos6.5 system

How to install gcc in centos6.5 system

王林
王林Original
2020-03-16 14:19:505742browse

How to install gcc in centos6.5 system

Online installation

Use yum to install. Note that you must first become the root user during installation.

The installation gcc command is as follows:

yum install gcc

(Recommended tutorial: centos usage tutorial)

Offline installation

First Go to http://vault.centos.org/6.5/os/x86_64/Packages/ to download the rpm package used.

Includes: ppl-0.10.2-11.el6.x86_64.rpm, cloog-ppl-0.15.7-1.2.el6.x86_64.rpm, mpfr-2.4.1-6.el6.x86_64. rpm, cpp-4.4.6-4.el6.x86_64.rpm, kernel-headers-2.6.32-279.el6.x86_64.rpm, glibc-headers-2.12-1.80.el6.x86_64.rpm, glibc-devel- 2.12-1.80.el6.x86_64.rpm, libstdc -devel-4.4.6-4.el6.x86_64.rpm, gcc-4.4.6-4.el6.x86_64.rpm, gcc-c -4.4.6-4. el6.x86_64.rpm

The installation command is as follows:

rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm 
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm 
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm 
rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm 
rpm -ivh kernel-headers-2.6.32-431.el6.x86_64.rpm 
rpm -ivh glibc-headers-2.12-1.132.el6.x86_64.rpm 
rpm -ivh glibc-devel-2.12-1.132.el6.x86_64.rpm 
rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm 
rpm -ivh libstdc++-devel-4.4.7-4.el6.x86_64.rpm 
rpm -ivh gcc-c++-4.4.7-4.el6.x86_64.rpm

Be sure to install it in order. Some installations will prompt already installed. It doesn't matter.

If you encounter an Error, add: Add parameters after installation --nodeps --force

rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm  --nodeps  --force
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm  --nodeps  --force
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm  --nodeps  --force
rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm  --nodeps  --force
rpm -ivh kernel-headers-2.6.32-431.el6.x86_64.rpm  --nodeps  --force
rpm -ivh glibc-headers-2.12-1.132.el6.x86_64.rpm  --nodeps  --force
rpm -ivh glibc-devel-2.12-1.132.el6.x86_64.rpm  --nodeps  --force
rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm  --nodeps  --force
rpm -ivh libstdc++-devel-4.4.7-4.el6.x86_64.rpm  --nodeps  --force
rpm -ivh gcc-c++-4.4.7-4.el6.x86_64.rpm  --nodeps  --force

After execution, gcc will be installed successfully.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to install gcc in centos6.5 system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn