RHEL6 using CentOS's Yum source

Source: Internet
Author: User
Tags gpg

1. Uninstall RHEL6 's own Yum source

Rpm-qa | grep Yum |xargs rpm-e--nodeps

2, download the corresponding installation package

# wget http://mirror.centos.org/centos-6/6.5/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm # wget HTTP://MIRROR.CENTOS.ORG/CENTOS-6/6.5/OS/X86_64/PACKAGES/YUM-3.2.29-40.EL6.CENTOS.NOARCH.RPM # wget/http mirror.centos.org/centos-6/6.5/os/x86_64/packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm# wget http:/ /mirror.centos.org/centos-6/6.5/os/x86_64/packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm



3. Install the 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 Yu m-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

4. Configure a new Yum source

# cd /etc/yum.repos.d/# wget  http://mirrors.163.com/.help/centos6-base-163.repo#  vi CentOS6-Base-163.repo   #编辑文件   Replace all the $releasever in the file with the version number, which is 6  last saved! [base]name=centos-6 - base - 163.combaseurl=http://mirrors.163.com/centos/6/os/$basearch/ gpgcheck=1gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6[updates]name=centos-6 -  updates - 163.combaseurl=http://mirrors.163.com/centos/6/updates/$basearch/gpgcheck=1gpgkey=http:// mirror.centos.org/centos/rpm-gpg-key-centos-6[extras]name=centos-6 - extras - 163. combaseurl=http://mirrors.163.com/centos/6/extras/$basearch/gpgcheck=1gpgkey=http://mirror.centos.org/centos/ rpm-gpg-key-centos-6[centosplus]name=centos-6 - plus - 163.combaseurl=http:// mirrors.163.com/centos/6/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/ rpm-gpg-key-centos-6[contrib]name=centos-6 - contrib - 163.combaseurl=http://mirrors.163.com/centos/6/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http:// Mirror.centos.org/centos/rpm-gpg-key-centos-6

5. The error message is as follows:

# Yum Makecachethere is a problem importing one of the Python modulesrequired to run yum. The error leading to this problem Was:no module named Yumplease Install a package which provides this module, orverify That's the module is installed correctly. It's possible that the above module doesn ' t match thecurrent version of Python, which is:2.6.1 (r261:67515, Oct 8 2014, 1 9:20:42) [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]if You cannot solve this problem yourself, click Go to the Yum FAQs at:

Error message is related to Python version

[Email protected] ~]# Whereis Pythonpython:/usr/bin/python2.6/usr/bin/python2.6-config/usr/bin/python/usr/bin/ python.old/usr/lib/python2.6/usr/lib64/python2.6/usr/include/python2.6/usr/local/python2.6/usr/share/man/man1/ Python.1.gz[[email protected] ~]# which Yum/usr/bin/yum change "#!/usr/bin/python2.6" to "#!/usr/bin/python2.6"


This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1674134

RHEL6 using CentOS's Yum source

Related Article

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.