RHEL 7 “There are no enabled repos”  的解决方法

[root@system1 Desktop]# yum install squid
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>

看到以上的报错,是你的 yum仓库出问题了,我现在教大家 建一个 本地YUM仓库, 这样就可以再使用啦!!

一种方法,最明显的方法是使用subscription-manager并遵循说明来注册您的RHEL7系统,从而启用RHEL的回购。为此,您需要付费或试用Redhat订阅。但是,如果您只是想在不需要最新红帽订阅的情况下进行游戏并安装软件,则可以安装下载的红帽ISO映像,并将其作为默认的本地存储库,并能够安装软件。要启用您的本地存储库,并从而克服第There are no enabled repos.一次挂载您的REHL7 ISO映像:

[root@rhel7 ~]# mkdir /media/rhel7-repo-iso
[root@rhel7 ~]# mount /dev/cdrom /media/rhel7-repo-iso/
mount: /dev/sr0 is write-protected, mounting read-only

现在,当您安装RHEL 7 iso时,请/media/rhel7-repo-iso/创建一个新的yum repo文件,其中包含以下内容:

[root@rhel7 ~]# vi /etc/yum.repos.d/RHEL_7_Disc.repo
[root@rhel7 ~]# cat /etc/yum.repos.d/RHEL_7_Disc.repo
[RHEL_7_Disc]
name=RHEL_7_x86_64_Disc
baseurl="file:///media/rhel7-repo-iso/"
gpgcheck=0

一旦准备就绪,检查新的仓库以启用这个仓库:

# yum repolist
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
RHEL_7_Disc | 4.1 kB 00:00:00
(1/2): RHEL_7_Disc/group_gz | 134 kB 00:00:00
(2/2): RHEL_7_Disc/primary_db | 3.4 MB 00:00:00
repo id repo name status
RHEL_7_Disc RHEL_7_x86_64_Disc 4,305
repolist: 4,305

(注:此处可能出现问题,解决方案见下文补充内容。)

        现在,您将能够在未注册的RHEL 7 Linux机器上安装新软件。缺点是您不会收到任何新的更新,这可能会为您的系统创建一个安全问题。而且,使用yum命令时:

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

补充:

运行yum repolist 有可能还是显示0。

yum将有关各个仓库的信息放到了单独文件中(在目录/etc/yum.repos.d下),当yum仍然显示“There are no enabled repos” , “yum repolistall“仍显示为0,那就看目录/etc/yum.repos.d下是否存在之前创建的配置文件

RHEL_7_Disc.repo

,若不存在此配置文件,手动创建并添加到目录/etc/yum.repos.d即可。

# cat /etc/yum.repos.d/RHEL_7_Disc.repo     新建这个文件repo,再保存,  你就可以再安装了其他服务啦!
[rhel7]
name=rhel7
baseurl=file:///media/cdrom/
enabled=1
gpgcheck=0

最后再做一个挂载吧,开机自动启动,方便以后使用

[root@system1 ~]# vim /etc/fstab

#
# /etc/fstab
# Created by anaconda on Tue Jul 16 15:51:34 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel-root / xfs defaults 1 1
UUID=9cead03a-2b93-4686-9b23-70cfb9264f3f /boot xfs defaults 1 2
/dev/mapper/rhel-swap swap swap defaults 0 0
/dev/cdrom /andy iso9660 defaults 0 0                            // 加上这一句话,就好了
~
~最后完成。

RHEL 7 “There are no enabled repos” 的解决方法的更多相关文章

  1. mysql问题Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)的解决方法

    在mysql命令行界面输入 mysql> set old_passwords=0;mysql> SET PASSWORD FOR hhds_test=PASSWORD('hhds_test ...

  2. There are no enabled repos.

    今天要记录一下自己懵逼的一天,原来自己是Ubuntu系统,还以为是centos,导致命令错了 There are no enabled repos. Run "yum repolist al ...

  3. Centos7最小化安装报错There are no enabled repos. Run "yum repolist all" to see the repos you have.解决办法

    原因是缺少CentOS-Base.repo文件,因为我这台机器wget也不能用,所以我是下载到本地sftp上去的,传输的时候一定要在root用户下,否则会无法启动传输 这是报错的完整信息:Loadin ...

  4. 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 ...

  5. 【解决方法】You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)

    出现场景: 正常调试是没有问题的,但是在Archive的时候,报出了这个错误. 问题详情: (null): URGENT: all bitcode will be dropped because ‘x ...

  6. 针对piix4_smbus ****host smbus controller not enabled的解决方法

    SMBus 目录 SMBus与I2C的差别 SMBus 是 System Management Bus 的缩写,是1995年由Intel提出的,应用于移动PC和桌面PC系统中的低速率通讯.它主要是希望 ...

  7. vmWare安装centos7之后使用yum安装提示there are on enabled repos(修改yum源)

    可以使用这个命令修改yum源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.rep ...

  8. yum无法正常安装,提示如下 There are no enabled repos Run "yum repolist all"

    一般来说著名的linux系统基本上分两大类:1 RedHat系列:Redhat.Centos.Fedora等2 Debian系列:Debian.Ubuntu等RedHat 系列:1 常见的安装包格式 ...

  9. CentOS7.x 报错 There are no enabled repos.

    地址 :http://mirrors.163.com/centos/7/os/x86_64/Packages/   wget http://mirrors.163.com/centos/7/os/x8 ...

随机推荐

  1. 关于kong | API Gateway

    目录 为什么需要 API 网关(more) kong的概念 为什么使用Kong Kong 的管理方式 高可扩展性的背后-插件机制 [前言]: Kong是一个云原生,高效,可扩展的分布式 API 网关. ...

  2. pxe+kickstart部署多个版本的Linux操作系统(上)---原理篇

    PXE概述: 1.PXE(Pre-bootExecution Environment),预启动执行环境2.通过网络接口启动计算机3.支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系 ...

  3. 题解 guP1948 【[USACO08JAN]电话线Telephone Lines】

    二分+dij题目 首先读一遍题目,一定要仔细读(不要问我为什么,我就是受害者qwq 你会发现最终的费用是由最长的电话线决定的,而非电话线长度和. 至此就有了一个基本思路--枚举(二分)出可能的最长电话 ...

  4. YAOI Round #1 题解

    前言 比赛网址:http://47.110.12.131:9016/contest/3 总体来说,这次比赛是有一定区分度的, \(\text{ACM}\) 赛制也挺有意思的. 题解 A. 云之彼端,约 ...

  5. 团队开发day07

    开始整合项目,测试登录,注册,搜索功能, 在安卓中数据处理存在个别错误,功能逻辑有个别不正确 进行修改和完善,添加二次确认退出

  6. 前端开发入门到进阶第二集【emmet插件的使用技巧】

    Emmet (前身为 Zen Coding) 是一个能大幅度提高前端开发效率的一个工具.基本上,大多数的文本编辑器都会允许你存储和重用一些代码块,我们称之为"片段".虽然片段能很好 ...

  7. xampp的Apache服务无法启动 Apache的443端口被占用解决方法

    今天在使用本地的XAMPP的时候,发现Apache服务不能正常启动,根据以往的经验,可能是80端口或者443端口被占用导致的,所以对端口占用情况进行排查. 1. 执行xampp/apache/bin中 ...

  8. MYSQL时间戳和日期相互转换 笔记整理

    相关函数: date_format(date, format) 函数,MySQL日期格式化函数date_format() unix_timestamp() 函数 str_to_date(str, fo ...

  9. [考试总结]noip模拟7

    为啥博客园 \(\LaTeX\) 老挂???! \(\huge{\text{菜}}\) 刚开始写 \(T1\) 的时候,在看到后缀前缀之后,直接想到 \(AC\) 自动机,在画了半个 \(trie\) ...

  10. nuxt服务部署到云上全程记录

    首先,在使用脚手架nuxt-app中创建项目时,箭头选用不起作用,这是因为git bash在windows中交互问题,临时的解决办法是换用cmd 登录云服务器后,首先安装nodejs yum inst ...