[Reference]:http://www.cnblogs.com/sunjiguang/p/5970217.html
[Reference]:http://www.openskill.cn/article/126
When I first entered the workplace, I encountered a problem when installing the Linux Redhat environment.
[email protected] ~]# Yum-y install gccloaded Plugins:katello, product-id, security, subscription-Manager Updating Certificate- Package do
For those of you who are accustomed to using CentOS, you can't use this command, it's kind of torture.
Resolution process:
1. Install the CentOS image for Linux Redhat
[Email protected]~]# wget http://Mirrors.163.com/.help/centos6-base-163.repo--2015-10-09 14:33:10--http://Mirrors.163.com/.help/centos6-base-163.reporesolving mirrors.163.com ... 123.58.173.186,123.58.173.185connecting to mirrors. 163.com|123.58.173.186|:802341 (2.3K) [application/octet-stream]saving to: ' CentOS6- Base-163.repo' 100%2,341 --.-k/s in 0s 2015-10-09 14:33:22 (108 MB/s)-' Centos6-base-163.repo ' saved [2341/2341]
2. Modify the Repo file
[[Email protected]~]# MV centos6-base-163.repo/etc/yum.repos.d/
-i ' s# $releasever #6#g './centos6-base-163.repo
3. Clear all Caches
[email protected] yum.repos.d]# Yum clean allloaded plugins:katello, product-id, security, subscription- Managerupdating Certificate-based repositories. Unable to read consumer identitycleaning up everything
4. Get the Yum list
[email protected] yum.repos.d]# Yum makecacheloaded Plugins:katello, product-id, Security, subscription-managerupdating Certificate-based repositories. Unable to read consumer Identityaddons | 1.9 KB 00:00Addons/filelists_db | 570 B 00:00.......... Base 3667/3667Base
3667/3667Base
3667/3667Metadata Cache Created
5. Search and install
[email protected] ~]# Yum search gcc |grep--color ' ^GCC 'gcc.x86_64:Various compilers (c, C+ +, objective-C, Java, ...) GCC-c++.x86_64:c++ Support forGCCGCC-gfortran.x86_64:fortran 95SUPPORTGCC-gnat.x86_64:ada Support forGCCGCC-java.x86_64:java Support forGCCGCC-objc++.x86_64:objective-c++ Support forGCCGCC-OBJC.X86_64:OBJECTIVE-C Support forGCCgcc44.x86_64:GNU Compiler Collection version4.4gcc44-c++.x86_64:c++ Support forGCC version 4.4gcc44-gfortran.x86_64:fortran Support forGCC 4.4
6. Installing GCC
[[email protected] yum.repos.d]# yum-y install GCC
At this point, the GCC installation is complete, and for other compilation environments you can use Yum to install
Gcc-c++ problem cannot be installed with the Yum command after installing Linux Redhat