報錯如下: Updating Subscription Management repositories. Unable to read consumer identity This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Error: There are no enabled repos. 翻譯一下就是:無法讀取用戶標識 解決方案:干掉yum,重新裝個centos的yum # 1. 刪除系統(tǒng)自帶yum包 [root@localhost ~]# rpm -qa|grep yum yum-4.0.9.2-5.el8.noarch # 2. 不檢查依賴直接刪除所有yum包 [root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps # 3. 檢查是否刪除成功 [root@localhost ~]# rpm -qa|grep yum 下一步,安裝yum,使用阿里云鏡像,找一下最新版的yum包,和 python3-urllib包 https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/ wget https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/yum-4.7.0-4.el8.noarch.rpm wget https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/yum-utils-4.0.21-3.el8.noarch.rpm wget https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/python3-urllib3-1.24.2-5.el8.noarch.rpm wget https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/dnf-4.7.0-4.el8.noarch.rpm wget https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/python3-dnf-4.7.0-4.el8.noarch.rpm wget https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/python3-dnf-plugins-core-4.0.21-3.el8.noarch.rpm 安裝 [root@localhost ~]# rpm -ivh --force --nodeps python3-dnf-4.7.0-4.el8.noarch.rpm warning: python3-dnf-4.7.0-4.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:python3-dnf-4.7.0-4.el8 ################################# [100%] [root@localhost ~]# rpm -ivh --force --nodeps python3-dnf-plugins-core-4.0.21-3.el8.noarch.rpm warning: python3-dnf-plugins-core-4.0.21-3.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:python3-dnf-plugins-core-4.0.21-3################################# [100%] [root@localhost ~]# rpm -ivh --force --nodeps dnf-4.7.0-4.el8.noarch.rpm warning: dnf-4.7.0-4.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:dnf-4.7.0-4.el8 ################################# [100%] [root@localhost ~]# rpm -ivh --force --nodeps yum-4.7.0-4.el8.noarch.rpm warning: yum-4.7.0-4.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:yum-4.7.0-4.el8 ################################# [100%] [root@localhost ~]# rpm -ivh --force --nodeps yum-utils-4.0.21-3.el8.noarch.rpm warning: yum-utils-4.0.21-3.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:yum-utils-4.0.21-3.el8 ################################# [100%] [root@localhost ~]# rpm -ivh --force --nodeps python3-urllib3-1.24.2-5.el8.noarch.rpm warning: python3-urllib3-1.24.2-5.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:python3-urllib3-1.24.2-5.el8 ################################# [100%] [root@localhost ~]# |
|