码迷,mamicode.com
首页 > 其他好文 > 详细

rhel7.0替换centos yum源

时间:2019-09-19 16:05:00      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:local   erro   host   ever   lis   parse   安装centos   boot   mirror   

1:卸载原先的yum
2:安装centos的yum
有以下的yum
yum-utils-1.1.31-24.el7.noarch
yum-langpacks-0.4.2-3.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-rhn-plugin-2.0.1-4.el7.noarch
PackageKit-yum-0.8.9-11.el7.x86_64
yum-3.4.3-118.el7.noarch

3:下载以下yum的包(2019/9/18日还行,以后不行,自己去网站找)
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-118.el7.centos.noarch.rpm http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-118.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-163.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-52.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-langpacks-0.4.2-7.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-rhn-plugin-2.0.1-10.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-52.el7.noarch.rpm

4:rpm -ivh yum-*发现报以下错
error: Failed dependencies:
python-urlgrabber >= 3.10-8 is needed by yum-3.4.3-163.el7.centos.noarch
rpm >= 0:4.11.3-22 is needed by yum-3.4.3-163.el7.centos.noarch
是说python的版本必须大于3.10-8

5:卸载原有python安装新的python
可以直接进行更新这个软件包
去rpm.pbone.net搜索这个包 python-urlgrabber-3.10-8.el7.noarch.rpm
然后去下载下来 wget ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/7.4/x86_64/os/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm
卸载原来的包 rpm -e --nodeps python-urgrabber-*
安装包 rpm -ivh --nodeps python-urlgrabber-3.10-8.el7.noarch.rpm
查看有没有安装上:[root@localhost ~]# rpm -qa |grep python-url
python-urlgrabber-3.10-8.el7.noarch

6:安装yum
rpm -ivh yum-* --nodeps

7:下载yum源
wget -c -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS7-Base-163.repo

8:替换版本为7
vim /etc/yum.repos.d/CentOS7-Base-163.repo
:%s/$releasever/7/g

9:yum repolist all

rhel7.0替换centos yum源

标签:local   erro   host   ever   lis   parse   安装centos   boot   mirror   

原文地址:https://www.cnblogs.com/xnb123/p/11549983.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!