Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redhat 6 :This system is not registered to Red Hat Subscription Management #56

Open
johnnian opened this issue Nov 20, 2018 · 0 comments
Labels

Comments

@johnnian
Copy link
Owner

johnnian commented Nov 20, 2018

现象

在RadHat 6.5 上使用yum命令的时候,发现提示:

[root@5093f2bb61ba /]# yum groupinstall 'Development Tools' -y
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Setting up Group Process
Warning: Group Development Tools does not exist.
Error: No packages in any requested group available to install or update

这个原因是:Redhat的yum是要注册收费的,所以,直接替换成CentOS的~

解决步骤

步骤1: 卸载自带的yum

[root@5093f2bb61ba /]# rpm -qa|grep yum
yum-3.2.29-81.el6.noarch
yum-plugin-ovl-1.1.30-42.el6_10.noarch
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-utils-1.1.30-42.el6_10.noarch
[root@5093f2bb61ba /]# rpm -qa|grep yum|xargs rpm -e --nodeps
warning: /etc/yum.conf saved as /etc/yum.conf.rpmsave
[root@5093f2bb61ba /]# rpm -qa|grep yum

步骤2: 安装CentOS yum

[root@5093f2bb61ba /]# rpm -ivh http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
[root@5093f2bb61ba /]# rpm -ivh http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
[root@5093f2bb61ba /]# rpm -ivh  http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm  http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
[root@5093f2bb61ba /]#  cd /etc/yum.repos.d
[root@5093f2bb61ba yum.repos.d]# ls
redhat.repo
[root@5093f2bb61ba yum.repos.d]# mv redhat.repo redhat.repo.bak
[root@5093f2bb61ba yum.repos.d]# curl http://mirrors.163.com/.help/CentOS6-Base-163.repo -o CentOS6-Base-163.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2006  100  2006    0     0  16893      0 --:--:-- --:--:-- --:--:-- 27861
[root@5093f2bb61ba yum.repos.d]# ls
CentOS6-Base-163.repo  redhat.repo.bak
[root@5093f2bb61ba yum.repos.d]# vi CentOS6-Base-163.repo
# 执行全文替换  :1,$s/$releasever/6

[root@5093f2bb61ba yum.repos.d]# yum clean all
[root@5093f2bb61ba yum.repos.d]# yum makecache

参考链接

@johnnian johnnian added the Linux label Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant