文章目录

  • 卸载python
  • 卸载yum
  • 安装yum

卸载python

rpm -qa|grep python|xargs rpm -ev –allmatches –nodeps

whereis python |xargs rm -frv

卸载yum

rpm -qa|grep yum|xargs rpm -ev –allmatches –nodeps

whereis yum |xargs rm -frv

安装yum

wget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-asn1crypto-0.24.0-3.el8.noarch.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-dnf-4.7.0-4.el8.noarch.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-gpg-1.13.1-9.el8.x86_64.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-hawkey-0.63.0-3.el8.x86_64.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-libcomps-0.1.16-2.el8.x86_64.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-libdnf-0.63.0-3.el8.x86_64.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-libs-3.6.8-41.el8.x86_64.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/python3-rpm-4.14.3-19.el8.x86_64.rpmwget https://vault.centos.org/centos/8.5.2111/BaseOS/x86_64/os/Packages/platform-python-3.6.8-41.el8.x86_64.rpmrpm -Uvh --force --nodeps *.rpm