Recently installed in the virtual machine rhel_6.5_x86_64, found unexpectedly do not bring g++, there is no way to "Yum install gcc-c++", helpless failure, the reason is that the Redhat yum is charged ...
So I plan to rage with other free Linux yum sources and look at CentOS.
I do not know why the 6.1~6.5 on the CentOS network is not supported by the update (the other mirror site is not on the nature), so select the 6.0 version, the installation steps are as follows:
1. Delete Redhat original Yum source
# Rpm-aq | grep Yum|xargs rpm-e--nodeps
2. Download the new Yum installation package
Here we use CentOS's yum source, official website http://mirror.centos.org/. Note, must be optimistic about the download is 32-bit or 64-bit!! (I made the mistake of 32-bit, toss for a long time.) )
- # wget http://mirror.centos.org/centos/6/os/x86_64/packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
- # wget http://mirror.centos.org/centos/6/os/x86_64/packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
- # wget http://mirror.centos.org/centos/6/os/x86_64/packages/yum-3.2.29-69.el6.centos.noarch.rpm
- # wget http://mirror.centos.org/centos/6/os/x86_64/packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
3. Install the Yum package
- # RPM-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm
- # RPM-IVH yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
- # RPM-IVH yum-3.2.29-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
Note: The last two packages are to be installed together at the same time, otherwise you will be prompted to rely on each other and the installation fails.
4. Change the Yum source configuration file #使用网易的CentOS镜像源
- # cd/etc/yum.repos.d/
- # wget http://mirrors.163.com/.help/centos6-base-163.repo
- #sed-i ' s/\ $releasever/6/g ' Centos6-base-163.repo # Replace all $releasever in the file with the version number, which is 6 last saved!
- MV Centos6-base-163.repo Rhel-source.repo # replacing system files
5. Clean up Yum Cache
- # Yum Clean All
- # yum Makecache #将服务器上的软件包信息缓存到本地 to improve the speed of search and install software
-----------------------------------------------Split Line--------------------------------------------------------------------
Then happily executed ' yum install gcc-c++ ' installed g++, did not expect to fail again, because GPG key retrieval failed!
Find a solution: Download a rpm-gpg-key-centos on the other image source, or choose the CentOS image source of NetEase.
# wget Http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
# RPM--import rpm-gpg-key-centos-5
or directly
#rpm--import Http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS
Ok! Continue "Yum Install gcc-c++", finally success!
Because of the toss for a long time, the special record, his souvenir, but also hope to facilitate other people.
Redhat 6.5 using Yum sources from other Linux image sources