centos7卸载了 yum后重新安装


前言

因为yum总是报错 可能之前没安装好 然后就一气之下卸载了 然后开启了安装之旅 记录一下

提示:以下是本篇文章正文内容,下面案例可供参考

一、安装yum源的一些依赖包

wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-cron-3.4.3-168.el7.centos.noarch.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-10.el7.noarch.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-2.7.5-89.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/rpm-libs-4.11.3-45.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/rpm-python-4.11.3-45.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/libxml2-2.9.1-6.el7.5.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/python-libs-2.7.5-89.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/rpm-4.11.3-45.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-3.4.3-168.el7.centos.noarch.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

安装 Python 相关库

安装 Python 相关的库:

rpm -ivh python-libs-2.7.5-89.el7.x86_64.rpm
rpm -ivh python-2.7.5-89.el7.x86_64.rpm

安装 RPM 相关工具

安装 RPM 工具和库:

rpm -ivh rpm-libs-4.11.3-45.el7.x86_64.rpm
rpm -ivh rpm-4.11.3-45.el7.x86_64.rpm

安装其他依赖

安装其他依赖的库和工具:

rpm -ivh libxml2-2.9.1-6.el7.5.x86_64.rpm
rpm -ivh python-urlgrabber-3.10-10.el7.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm

安装 YUM 工具及插件

安装 YUM 和插件:

rpm -Uvh yum-3.4.3-168.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm

验证 YUM 版本

确认 YUM 是否正确安装:

yum --version
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值