在使用yum安装软件的时候报了下面的错误:

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 <repo>To enable custom repositories:yum-config-manager --enable <repo>

解决方案:
去网站下载对应版本repo文件, 放入/etc/yum.repos.d/里

https://mirrors.aliyun.com/centos/

生成缓存

yum clean all
yum makecache

结果报以下错

已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"One of the configured repositories failed (未知),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=trueCannot find a valid baseurl for repo: CentOS-Base/x86_64

然后去看了一下网卡配置发现dns不知道怎么没有了
解决方案:补上dns

vim /etc/resolv.conf#添加以下内容
nameserver 8.8.8.8

然后重新生成缓存

CentOS报错:There are no enabled repos相关推荐

  1. vmware安装minimal centos报错/etc/rc5.d/s99local : line

    2019独角兽企业重金招聘Python工程师标准>>> 有人用vmware安装minimal centos报错/etc/rc5.d/s99local : line:25 : ejec ...

  2. windows 7 远程桌面连接centos报错,包括但不限于连接断开解决办法

    windows 7 远程桌面连接centos报错,包括但不限于连接断开 问题:使用windows7连接centos中的xrdp服务时会报错,错误内容包括:网络断开丢失连接,无法识别的函数标识等: 解决 ...

  3. flashftp连接虚拟机centos报错的解决方法

    flashftp连接虚拟机centos报错的解决方法 参考文章: (1)flashftp连接虚拟机centos报错的解决方法 (2)https://www.cnblogs.com/yjdcoder/p ...

  4. CentOS报错:removing mirrorlist with no valid mirrors: /var/cache/yum/i386/6/base/mirrorlist.txt

    参考文献:https://www.jianshu.com/p/26eaf53102e2 打算在Centos6上安装gcc,输入yum install gcc提示如下: Loaded plugins: ...

  5. CentOS报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7arch=x86_64repo=osi...

    最小化安装的CentOS 7在运行yum安装命令时报了以下错误: 1 Could not retrieve mirrorlist http://mirrorlist.centos.org/?relea ...

  6. mmdetection报错:ImportError: /home/user/repos/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-37m-x

    环境配置:torch 1.11.0+cuda 11.3 (最新) 使用mmdetection进行推断: from mmdet.apis import init_detector, inference_ ...

  7. EasyCVR调用云端录像接口报错“Channel[5] Not Enabled“处理

    EasyCVR视频协议融合平台不仅支持常规协议的接入,我们还拓展了海康SDK.大华SDK.Ehome等私有协议.如果前端设备协议不同且数量较多,则可以通过EasyCVR平台来对所有视频通道做整合和统一 ...

  8. 用U盘安装centOS报错

    因为看鸟哥的Linux私房菜,决定自己装Linux系统来玩玩. 下载centos6.0,用USB Installer将ISO镜像拷入USB,调整BIOS启动顺序,用U盘进入. 结果还未到安装程序,就黑 ...

  9. CentOS报错make: *** [fuzz-commit-graph.o] Error 1

    目录 一.问题描述 二.解决方法 一.问题描述 CentOS 7 下执行 make profix=/usr/local/git 命令时报错: [root@server-c00ef8c3-710d-47 ...

最新文章

  1. 关于自动驾驶,我们是否在刻意回避这三大关键问题?
  2. bootstrap的栅格布局与两列布局结合使用
  3. 一周一论文(翻译)——[SIGMOD 19] Elasticutor:Rapid Elasticity for Realtime Stateful Stream Processing
  4. python模板语言_Python Django 模板语言之 Tags(标签)
  5. 深入理解Kafka(2)-Producer
  6. 数据仓库设计方案(转载)
  7. Oracle精简客户端配置
  8. JavaScript学习笔记:数组reduce()和reduceRight()方法
  9. 程序员的第一份实习!附面试初体验
  10. 【数电】(一) 进制转换编码 原码,反码,补码
  11. 如何实现在Windows上运行Linux程序,附示例代码
  12. visionpro 图片格式转海康图片格式
  13. jQuery实现清空table表格除首行外的所有数据
  14. android维文字体下载,Badam维汉输入法
  15. oracle 除数不能为0
  16. linux怎么定时备份文件,linux自动定时备份文件
  17. Python choice() 函数
  18. 类型多样的终结者游戏成套模型素材,速来收藏
  19. 硬核小知识,网络管理员的技术职业规划《一》
  20. STAC: A Simple Semi-Supervised Learning Framework for Object Detection

热门文章

  1. Google hacking使用总结
  2. X99主板2011-3接口E5 CPU一览表
  3. 文案自动修改软件-文案自动改写的免费软件下载
  4. 星际争霸兵种的诉苦(简略版)
  5. 设置切换输入法按键ctrl+shift
  6. 【烈日炎炎战后端】计算机网络(4.2万字)
  7. Linux发行版幽灵漏洞的backport
  8. 怎么在电脑上进行音频以及视频的素材合并
  9. 钉钉API考勤打卡记录获取并存入数据库(python)
  10. 关于小学生学习编程语言C++的经历经验分享,五问五答