問題
在Redhat上無法使用yum,檢查版本為redhat6.8
# yum update
Plugin "product-id" can't be imported
Plugin "search-disabled-repos" can't be imported
Plugin "subscription-manager" can't be imported
Loaded plugins: aliases, changelog, kabi, ovl, presto, refresh-packagekit,
: security, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
Setting up Update Process
No Packages marked for Update
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
解決方案
思路:卸載原有自帶的yum,替換成同版本centos的yum
卸載原有自帶的yum
rpm -qa | grep yum | xargs rpm -e --nodeps
下載軟件包
由于官方源已經(jīng)無法下載,使用其他源
https://archive.kernel.org/centos-vault/6.8/os/x86_64/Packages/
wget --no-check-certificate https://archive.kernel.org/centos-vault/6.8/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget --no-check-certificate https://archive.kernel.org/centos-vault/6.8/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
wget --no-check-certificate https://archive.kernel.org/centos-vault/6.8/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm
wget --no-check-certificate https://archive.kernel.org/centos-vault/6.8/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
安裝
# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
# rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
# rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm