RedHat 6.2 Linux Modified Yum source free use of CentOS source
When installing Nginx on a new Redhat Linux server, none of the commands can be parsed, the GCC editor is missing, and the command to install GCC is faulty.
[[email protected] ~]# yum-y install GCC
Loaded Plugins:katello, Product-id, security, Subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
No package GCC available.
Nothing to do
Without the GCC package,
Finally find a solution
Check version:
[Email protected] ~]# cat/etc/issue
Resolution process:
1. Download the 163 installation source
[Email protected]~]# wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo Note that Here I start is Centos5-base-163.repo, has been to the fourth step has the problem, later changed into the Centos6-base-163.repo"
PS: My version is 6
2. Modify the repo file (according to the Red Hat version)
[[Email protected]~]# MV centos6-base-163.repo/etc/yum.repos.d/
Replace the $releasever with 6 (Red Hat version 6 above is changed to 6)
[Email protected] yum.repos.d]# sed-i ' s# $releasever #6#g './centos5-base-163.repo
3. Clear the original cache
[email protected] yum.repos.d]# Yum Clean all
4. Get the Yum list
[email protected] yum.repos.d]# Yum Makecache
5. Search and install
[email protected] ~]# Yum search gcc |grep--color ' ^GCC '
6. Installing GCC
[[email protected] yum.repos.d]# yum-y install GCC
This completes the GCC installation.
Linux Redhat cannot install software issues (no package GCC available. DO)