错误信息

[root@bogon apache-tomcat-7.0.]# yum install gcc-c++
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>

解决方法

1、查看redhat 7.0系统本身所安装的那些yum软件包

[root@bogon apache-tomcat-7.0.]# rpm -qa | grep yum
yum-rhn-plugin-2.0.-.el7.noarch
yum-metadata-parser-1.1.-.el7.x86_64
yum-3.4.-.el7.noarch

2、卸载这些软件包

[root@bogon apache-tomcat-7.0.]# rpm -e yum-rhn-plugin-2.0.-.el7.noarch --nodeps
[root@bogon apache-tomcat-7.0.]# rpm -e yum-metadata-parser-1.1.-.el7.x86_64 --nodeps
[root@bogon apache-tomcat-7.0.]# rpm -e yum-3.4.-.el7.noarch --nodeps

3、保证本机电脑能上网

[root@bogon apache-tomcat-7.0.]# ping www.baidu.com
PING www.a.shifen.com (61.135.169.121) () bytes of data.
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.17 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=4.52 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.69 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=3.33 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.57 ms
bytes from 61.135.169.121 (61.135.169.121): icmp_seq= ttl= time=5.18 ms

4、找到自己所需要的版本下载

wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-45.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm

5、安装软件包

rpm -ivh python-*

rpm -ivh yum-*

6、新建repo 配置文件(如果是其他版本,则将下面的7改为你当前的版本数字)

vim /etc/yum.repos.d/CentOS-Base.repo

#CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$ - Base - .com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #released updates
[updates]
name=CentOS-$ - Updates - .com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful
[extras]
name=CentOS-$ - Extras - .com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$ - Plus - .com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=
enabled=
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

7、清除缓存

yum clean all

8、测试是否正常

yum -y install lftp

参考网址:

https://www.linuxidc.com/Linux/2017-04/142444.htm

http://qingfengjushi1.iteye.com/blog/2282986(这个链接地址里面有已经下载好的rpm)

https://www.cnblogs.com/horizonli/p/5507112.html

This system is not registered with an entitlement server. You can use subscription-manager to register.的更多相关文章

  1. Red Hat Enterprise 7.5 安装后无法进入图形界面 This system is not registered with an entitlement server. You can use subscription-manager to register.

    This system is not registered with an entitlement server. You can use subscription-manager to regist ...

  2. Cockpit subscriptions on CentOS 7 - This system is not registered with an entitlement server. You can use subscription-manager to register.

    下午安装 cockpit 时,使用 yum 工具的时候哦,出现如下信息: This system is not registered with an entitlement server. You c ...

  3. yum提示This system is not registered with RHN.RHN support will be disabled.

    [root@cactiez ~]# yum install mlocateLoading "security" pluginLoading "rhnplugin" ...

  4. This system is not registered with RHN

    在红帽EL5上运行yum,提示“This system is not registered with RHN”,意思是没有在官网上注册,不能下载RH的软件包,替代方案是采用centos源. 1.卸载r ...

  5. This system is not registered with RHN解决方法

    root@localhost ipvsadm-1.25]# yum install gcc Loading "security" plugin Loading "rhnp ...

  6. red-hat6.5 yum 源配置,cloud-init 安装 This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register

    This system is not registered to Red Hat Subscription Management. You can use subscription-manager t ...

  7. Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...

  8. RedHat Enterprise Linux 6.4使用yum安装出现This system is not registered to Red Hat Subscription Management

    我虚拟机安装的系统是RedHat Enterprise Linux 6.4-i686,是32位的.使用yum命令安装软件时候出现以下错误: This system is not registered ...

  9. 使用yum时报错 This system is not registered to Red Hat Subscription Management

    错误原因:使用redhat的yum源是需要注册付费的. 1.卸载RedHat自带的yum包 查看已安装的yum rpm -qa|grep yum #卸载已安装的yum rpm -qa | grep y ...

随机推荐

  1. Python正则表达式与re模块介绍

    Python中通过re模块实现了正则表达式的功能.re模块提供了一些根据正则表达式进行查找.替换.分隔字符串的函数.本文主要介绍正则表达式先关内容以及re模块中常用的函数和函数常用场景. 正则表达式基 ...

  2. fopen函数出现段错误

    昨天写代码的时候突然发现了一个问题,当使用fopen("<filepath>", "r")时,如果filepath不存在,那么fopen函数并不是像 ...

  3. spring boot 开发非web应用程序

  4. 吴裕雄 25-MySQL 临时表

    MySQL 临时表MySQL 临时表在我们需要保存一些临时数据时是非常有用的.临时表只在当前连接可见,当关闭连接时,Mysql会自动删除表并释放所有空间.临时表在MySQL 3.23版本中添加,如果你 ...

  5. js基础-基本包装类型

    var t = 13; t.toString(); //t是一个简单数值类型 现在有了方法 toString 对象类型的方法 //数值类型有对应的包装类型 var t1 =new Number(333 ...

  6. linux 设备驱动分类

    1. 字符设备 :在I/O传输过程中以字符为单位. 2. 块设备: 在传输过程中以块为单位,相关概念有 缓冲,I/O调度,请求队列.主要体现出与字符设备在操作硬件的接口实现方式上是不一样的. 3. 网 ...

  7. python 删除模块

    import systry:    import librabbitmqexcept Exception:    passelse:    version = getattr(librabbitmq, ...

  8. vue分页 点击(非下拉)

    1.主页面 <template> <div class="list"> <template v-if="count"> 55 ...

  9. mysql 在登陆的时候出现error 1045 (28000): 错误解决办法

    错误显示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决方案: 1.找到配 ...

  10. encodeURI & encodeURIComponent

    [encodeURI & encodeURIComponent]  区别在于,"&", "+", 和 "=" 不会被enco ...