yum install 安装时报yum doesn't have enough cached data to continue.

安装epelyum -y install epel-release后,yum安装时出现如下异常:

[root@ec-cache ~]# yum install gcc
已加载插件:fastestmirror
base | 3.6 kB 00:00:00 One of the configured repositories failed (未知),
and yum doesn't have enough cached data to continue. At this point the only
safe 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 working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work). 3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage: yum-config-manager --disable <repoid> 4. 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 much
slower). If it is a very temporary problem though, this is often a nice
compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again

解决办法:

1、将/etc/yum.repos.d/epel.repo中的mirrorlist改为baseurl

[root@ec-cache ~]# /usr/bin/vi /etc/yum.repos.d/epel.repo

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 [epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1 [epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

2、/etc/resolv.conf文件中增加nameserver 144.144.144.144

[root@ec-cache ~]# vi /etc/resolv.conf

# Generated by NetworkManager
nameserver 192.168.1.2
nameserver 144.144.144.144

3、再次执行即可

yum install 安装时报yum doesn't have enough cached data to continue.的更多相关文章

  1. 两台centos,用yum install 安装,一台成功,一台失败

    记录一下问题: 两台centos,用yum install 安装软件,一台成功,一台失败 第一步:查看yum源  yum repolist enabled 疑问:centos安装的方法一致,但yum源 ...

  2. Linux使用yum install 安装程序时,提示“另外一个程序锁定了 yum;等待它退出……”

    Linux使用yum install 安装程序时,提示“另外一个程序锁定了 yum:等待它退出……” 原因: yum命令一次只能安装一个软件,所以当你下载安装第二个软件包时,系统进程锁会锁定yum,这 ...

  3. yum 安装 epel-release 后出现yum doesn’t have enough cached data to continue错误的解决方案

    工作中需要部署docker,由于是内网环境,无法直接访问外网,于是考虑在内网搭建yum私有源进行安装,内网服务器操作系统为centos 7.4.根据docker的官方安装方式进行安装时,要求安装 ep ...

  4. Linux 使用yum install安装mysql登陆不上解决办法

    CentOS yum安装mysql后 Can’t connect to local MySQL server through socket ‘/var/lib/ CentOS Can’t connec ...

  5. vm安装centos后unknown host问题和yum install安装不成功问题

    网上差了很多说要在vi /etc/sysconfig/network新增GATEWAY=192.168.0.1 还有vi /etc/sysconfig/network-scripts/ifcfg-et ...

  6. yum install 安装 下载好的rpm包 会并依赖包一起安装 zoom电话会议的安装

    [root@ok-T Downloads]# rpm -ivh zoom_x86_64.rpm error: Failed dependencies: libxcb-image.so.()(64bit ...

  7. Centos6.3不能使用yum install安装gcc编辑器解决办法

    mv /var/lib/rpm/__db* /tmp rpm --rebuilddb yum clean all

  8. 【Centos】【Python3】yum install 报错

    运行yum install 安装时报错 File "/usr/libexec/urlgrabber-ext-down", line 28 except OSError, e: Sy ...

  9. yum安装命令:遇到的问题报错如下: File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 通过看报错可以了解到是使用了python2的语法,所以了解到当前yum使用的Python2,因为我单独安装了python3,且python3设置为默认版本了,所以导致语法问题 解决方法: 使用python2.6 yum install

    1.安装zip yum install -y unzip zip 2.安装lrszs yum -y install lrzsz 3.安装scp 遇到下面的问题: 结果提示: No package sc ...

随机推荐

  1. php 利用ffmpeg将amr转MP3

    原文地址: http://www.jianshu.com/p/895d5568ce70 http://www.cnblogs.com/wanghetao/p/3386311.html http://w ...

  2. jsp系统时间和时间对比(活动结束不结束)

    jsp页面拿到系统时间 <jsp:useBean id="now" class="java.util.Date" /> <fmt:format ...

  3. 四种生成和解析XML文档的方法详解(介绍+优缺点比较+示例)

    众所周知,现在解析XML的方法越来越多,但主流的方法也就四种,即:DOM.SAX.JDOM和DOM4J 下面首先给出这四种方法的jar包下载地址 DOM:在现在的Java JDK里都自带了,在xml- ...

  4. cad中关于点样式点的绘制

    点样式 从0开始, 默认的就是0 0= 一个小点; 1= 空的, 什么都不显示; 2= +加号; 3= X 叉号 设置点样式的命令是: pdmode: 可以假设认为是: point default m ...

  5. Java UDP 数据报

    服务端,创建一个DatagramSocket对象,侦听在某个端口,创建一个DatagramPacket对象接受数据.收到客户端发来的信息后,有原封不动转发到客户端. public class Data ...

  6. [译]Probable C# 6.0 features illustrated

    原文: http://damieng.com/blog/2013/12/09/probable-c-6-0-features-illustrated ========================= ...

  7. 基础知识系列☞C#中数组Array、ArrayList和List三者的区别

    数组() #region 数组 //初始化方式_0:先声明再赋值 ]; weekDays_0[] = "Sun"; weekDays_0[] = "Mon"; ...

  8. spring学习

    http://blog.csdn.net/chjttony/article/details/6301523 http://blog.csdn.net/chjttony/article/details/ ...

  9. ThinkPHP框架表单验证

    对注册到test表的表单进行验证 在注册之前要对表单进行验证: 用户名非空验证,两次输入密码必须一致即相等验证,年龄在18~50之间即范围验证,邮箱格式正则验证. 自动验证是ThinkPHP模型层提供 ...

  10. Javascript高级程序设计——函数声明与函数表达式的区别

    在Javascript中,函数是Functioin类型的实例,所以函数也具备属性和方法,因为函数是对象,所以函数名自然就是指向对象的指针啦. 函数可以通过声明语法和表达式来定义: 声明:functio ...