yum 安装 epel-release 后出现yum doesn’t have enough cached data to continue错误的解决方案
工作中需要部署docker,由于是内网环境,无法直接访问外网,于是考虑在内网搭建yum私有源进行安装,内网服务器操作系统为centos 7.4。根据docker的官方安装方式进行安装时,要求安装 epel-release 以及 container-selinux。
于是进行同步base以及epel源,reposync base && reposync epel。
到内网环境中,通过 createrepo ./的方式创建私有源,并在另一台服务器上逐步安装,当安装完毕epel-release后,再进行安装container-selinux时,出现错误。
已加载插件: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
原因是安装完毕 epel-release 后, 会在 /etc/yum.repo.d/目录中添加 epel.repo 以及 epel-testing.repo 两个配置文件,配置文件中包含 container-selinux 的yum源。
解决方法:
- 继续同步
epel.repo中指定的yum源,并修改本地/etc/yum.repo.d/epel.repo对应的yum源路径。 - 找一台可下载
container-selinux相关rpm包的服务器下载关联安装包进行安装。
我目前是使用的第二种解决方案,在一台能上外网的机器中执行如下命令:
# 挂载位置轻喷 嘻嘻
sudo docker rum --rm -v /container-selinux:/data -it centos:latest /bin/bash -c "yum install -y epel-release && yum install container-selinux --downloadonly --downloaddir=/data"
然后将/container-selinux/ 中container-selinux*.rpm 拷贝到目标服务器中,执行rpm安装命令即可
sudo rpm -ivh container-selinux*.rpm
由于人也比较懒,所以安装docker-ce相关的内容时也不会去配置GPG公钥,安装的时候跳过即可
sudo yum install -y docker-ce docker-ce-cli containerd.io --nogpgcheck
yum 安装 epel-release 后出现yum doesn’t have enough cached data to continue错误的解决方案的更多相关文章
- yum安装epel库后,安装软件总是提示Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again(无法检索epel仓库)
解决方法: vi /etc/yum.repos.d/epel.repo 将baseurl中的注释取消,将mirrorlist该列注释掉即可. 附图如下:
- CentOS7用yum安装wget命令后仍然提示命令找不到的解决方法
需求:用的AWS实例自带的CentOS7用yum安装wget命令后扔提示命令找不到,后面用源码安装方式解决,下面先讲解决方法,疑问及知识点扩展最后写出 1.问题(因是mini版本系统,有些基本命令扔需 ...
- yum install 安装时报yum doesn't have enough cached data to continue.
yum install 安装时报yum doesn't have enough cached data to continue. 安装epel,yum -y install epel-release后 ...
- yum安装epel源
国内yum源的安装(163,阿里云,epel) 国内yum源的安装(163,阿里云,epel) ----阿里云镜像源 1.备份 mv /etc/yum.repos.d/CentOS-Base.re ...
- 用yum安装完mysql后没有mysqld的问题
在Centos中用命令 yum install mysql安装数据库,但装完后运行mysqld启动mysql的时候提示找不到,通过 find / | grep mysqld 也没找到mysqld的目录 ...
- 02: 安装epel 解决centos7无法使用yum安装nginx
参考网址: http://www.mamicode.com/info-detail-1671603.html 1.yum命令安装 yum install epel-release -y 2.更新数据 ...
- 【Linux】CentOS7 上使用yum安装和卸载软件【yum安装wine举例】
关于yum的相关解释,请 man yum 自行查看. 配置常用源:http://www.cnblogs.com/sxdcgaq8080/p/7516186.html yum的使用类似于在windows ...
- Centos7:yum安装MySQL5.7后如何设置root密码
Centos下安装软件的方式很简单,只需要通过yum install xxx命令即可.第一步当然检查是否有mysql的yum源,命令:yum list|grep mysql-community[主要还 ...
- CentOS6.5 安装Python2.7后, yum出现“No module named yum”错误
安装如下方法安装python2.7: yum install –y python27 python27-devel python-docutils cd /usr/bin/ rm -rf python ...
随机推荐
- ssh免密码登录与常见问题
免密码登录 cd ~/.ssh ssh-keygen -t rsa #然后敲回车 mv id_rsa.pub master_rsa.pub cat master_rsa.pub >> au ...
- P2597 [ZJOI2012]灾难——拓扑,倍增,LCA
最近想学支配树,但是基础还是要打好了的: P2597 [ZJOI2012]灾难 这道题是根据食物链链接出一个有向图的关系,求一个物种的灭绝会连带几种物种的灭绝: 求得就是一个点能支配几个点: 如果一个 ...
- linux 查看内存条详情命令
dmidecode |more
- Java常用工具类之数据库操作辅助类DBUtil.java
package com.qushida.util; import java.beans.BeanInfo; import java.beans.Introspector; import java.be ...
- BZOJ4237稻草人——单调栈+CDQ分治
题目描述 JOI村有一片荒地,上面竖着N个稻草人,村民们每年多次在稻草人们的周围举行祭典. 有一次,JOI村的村长听到了稻草人们的启示,计划在荒地中开垦一片田地.和启示中的一样,田地需要满足以下条件: ...
- spring cloud 常见面试题 来理解微服
为什么要谈 这些理论知识呢 理论知识 = 面试时候的谈资 !!! 你只有 进去公司 才有资格 去做一个码农 ok 话不多说 经历如此漫长的互联网发展 以本人的拙见 软件开发 粗略的 分为 ...
- Struts2(补充)
关于Struts 配置文件(Struts.xml)中结果页说明 <result type=" " name=" "> </result> ...
- STM32F4 LTDC
首先配置同步时序先看参考手册 下面看一个实际例子,一块439的开发板 设置: 配置时序 LTDC_InitStruct.LTDC_HorizontalSync = ; /* */ LTDC_InitS ...
- 通过phpMyAdmin优化mysql 数据库可能存在的问题
通过phpMyAdmin优化mysql 数据库可能存在的问题 文章来源:外星人来地球 欢迎关注,有问题一起学习欢迎留言.评论
- Redis操作类型