CentOS 7.9 yum命令安装软件提示报错,提示表示在你的系统上没有启用任何软件仓库 您所在的位置:网站首页 用yum提示没有已启用的仓库 CentOS 7.9 yum命令安装软件提示报错,提示表示在你的系统上没有启用任何软件仓库

CentOS 7.9 yum命令安装软件提示报错,提示表示在你的系统上没有启用任何软件仓库

2024-07-03 14:37| 来源: 网络整理| 查看: 265

场景环境:

[root@server01 home]# more /etc/redhat-release  CentOS Linux release 7.9.2009 (Core) [root@server01 home]# uname Linux  

问题描述: yum update 报错提示如下错误

 [root@server01 ~]# yum update Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager

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

Loading mirror speeds from cached hostfile 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  

原因分析:yum命令安装软件提示报错,提示表示在你的系统上没有启用任何软件仓库,由于备份把文件给挪移到back目录下来

查看/etc/yum.repos.d目录下:CentOS-Base.repo文件

配置如下,国内指向aliyun:

[base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/         http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/         http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7   #released updates  [updates] name=CentOS-$releasever - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/         http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/         http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7   #additional packages that may be useful [extras] name=CentOS-$releasever - Extras - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/         http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/         http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7   #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/         http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/         http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7   #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/         http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/         http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7  



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有