Redhat 6.5 using Yum sources from other Linux image sources

Source: Internet
Author: User
Tags gpg

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.) )

    1. # wget http://mirror.centos.org/centos/6/os/x86_64/packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
    2. # wget http://mirror.centos.org/centos/6/os/x86_64/packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
    3. # wget http://mirror.centos.org/centos/6/os/x86_64/packages/yum-3.2.29-69.el6.centos.noarch.rpm
    4. # 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

    1. # RPM-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm
    2. # RPM-IVH yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
    3. # 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镜像源

    1. # cd/etc/yum.repos.d/
    2. # wget http://mirrors.163.com/.help/centos6-base-163.repo
    3. #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!
    4. MV Centos6-base-163.repo Rhel-source.repo # replacing system files

5. Clean up Yum Cache

    1. # Yum Clean All
    2. # 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

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.