Redhat7 yum安装有问题+yum无法使用+There are no enabled repos. Run “yum repolist all“ to see the repos you ha

这篇博客介绍了如何解决CentOS系统未注册问题,通过运行订阅管理器进行注册,并卸载特定Java版本及yum插件。接着,提供了从百度网盘下载的Python和Yum相关包进行安装的命令。然后,详细展示了如何在/etc/yum.repos.d/目录下导入CentOS7-Base-163.repo文件,并修改配置以使用163镜像源,确保系统能够正常更新和获取软件。
摘要由CSDN通过智能技术生成

已加载插件: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
To enable custom repositories:
yum-config-manager --enable

解决:
1.卸载:

rpm -e --nodeps java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64
rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.191.b12-0.el7_5.x86_64
rpm -e --nodeps yum-rhn-plugin-2.0.1-9.el7.noarch
1.1 安装以下包。

在这里插入图片描述
链接: https://pan.baidu.com/s/19yT8bbBhiSATovdx26Lteg 提取码: 3z4c 复制这段内容后打开百度网盘手机App,操作更方便哦

安装命令:
rpm -ivh python-*
rpm -ivh yum-*

  1. 在目录 /etc/yum.repos.d/ 导入文件
    CentOS7-Base-163.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-$releasever - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=7&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=7&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=7&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

在这里插入图片描述
成功解决。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值