Redhat 6.5的环境,大部分yum源都失效的撒,所以如何解决呢?简单~

1.列出原装rpm包。

rpm -qa | grep yum

2.卸载列出的rpm包:

rpm -e yum-plugin-security-1.1.30-14.el6.noarch --nodeps
rpm -e PackageKit-yum-0.5.8-21.el6.x86_64 --nodeps
rpm -e yum-rhn-plugin-0.9.1-48.el6.noarch --nodeps
rpm -e yum-3.2.29-40.el6.noarch --nodeps
rpm -e PackageKit-yum-plugin-0.5.8-21.el6.x86_64 --nodeps
rpm -e yum-utils-1.1.30-14.el6.noarch --nodeps
rpm -e yum-metadata-parser-1.1.2-16.el6.x86_64 --nodeps

3.从http://vault.centos.org/6.5/os/x86_64/Packages/ 找到你版本对应的CentOS的yum相关rpm,并下回来:

wget http://vault.centos.org/6.5/os/x86_64/Packages/yum-plugin-security-1.1.30-14.el6.noarch.rpm
wget http://vault.centos.org/6.5/os/x86_64/Packages/PackageKit-yum-plugin-0.5.8-21.el6.x86_64.rpm
wget http://vault.centos.org/6.5/os/x86_64/Packages/PackageKit-yum-0.5.8-21.el6.x86_64.rpm
wget http://vault.centos.org/6.5/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm
wget http://vault.centos.org/6.5/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
wget http://vault.centos.org/6.5/os/x86_64/Packages/yum-utils-1.1.30-14.el6.noarch.rpm
wget http://vault.centos.org/6.5/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

4.安装刚才下好的rpm:

rpm -ivh *.rpm

5.下载:Centos-6.repo

6.上传到(万一见鬼了有同名文件,不要怂,覆盖过去)

/etc/yum.repos.d/Centos-6.repo

注意,这个目录下如果存在redhat开头的文件,可以移出去。

7.执行如下指令清除缓存后重建缓存

yum clean all
yum makecache

本质上就是给了你个CentOS官方的源,别奢求太多,国内没找到这么古老的有效源,凑合用吧。

Related Posts: Redhat 6.5使用CentOS 6的Yum源 :

avatar