【Centos8 安装yum包管理工具】

本文介绍了如何在CentOS8系统中下载并使用yum完成Python3及相关包(如dnf、gpg等)的安装,包括执行wget命令获取包、使用rpm进行安装以及验证yum的版本。
摘要由CSDN通过智能技术生成

下载Python和yum包


#python
cd /usr/local/src/python
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-asn1crypto-0.24.0-3.el8.noarch.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-dnf-4.7.0-4.el8.noarch.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-gpg-1.13.1-9.el8.x86_64.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-hawkey-0.63.0-3.el8.x86_64.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-libcomps-0.1.16-2.el8.x86_64.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-libdnf-0.63.0-3.el8.x86_64.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-libs-3.6.8-41.el8.x86_64.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/python3-rpm-4.14.3-19.el8.x86_64.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/platform-python-3.6.8-41.el8.x86_64.rpm
#yum
cd /usr/local/src/yum
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/yum-4.7.0-4.el8.noarch.rpm
wget https://repo.huaweicloud.com/centos/8-stream/BaseOS/x86_64/os/Packages/yum-utils-4.0.21-3.el8.noarch.rpm

安装python

cd /usr/local/src/python
rpm -ivh python3-* platform-python-* --nodeps --force

安装yum

cd /usr/local/src/yum
rpm -Uvh --force --nodeps *.rpm

验证yum安装版本

yum --version

#输出结果
4.7.0
  Installed: dnf-0:4.7.0-4.el8.noarch at Sat 03 Sep 2022 03:36:18 AM GMT
  Built    : CentOS Buildsys <bugs@centos.org> at Fri 17 Sep 2021 07:06:14 PM GMT

  Installed: rpm-0:4.14.3-19.el8.x86_64 at Sat 03 Sep 2022 03:36:09 AM GMT
  Built    : CentOS Buildsys <bugs@centos.org> at Fri 15 Oct 2021 05:46:55 PM GMT
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值