Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache

摘要:
Orrun:yummakecachefast备注:根据其提示信息执行操作,发现提示信息仍然存在。b清除yum缓存12345678910111213141516171819202122324252627282930[root@openstack-01~]#Yumcleanhall已加载插件:fastmirror、langpacksPodaisaver2weeksold。安装yum cron?

1、事件描述:CentOS7下使用tree命令,发现该命令没有被安装,在安装的过程中发现yum报错

1
2
3
4
5
[root@openstack-01 ~]# tree -d
bash: tree: 未找到命令...
[root@openstack-01 ~]# yum -y install tree
已加载插件:fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast

2、处理过程

a、直接执行yum makecache fast

[root@openstack-01 ~]# yum makecache fast

已加载插件:fastestmirror, langpacks

Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast

备注:根据它的提示信息执行操作,发现提示信息依旧

b、清除yum缓存

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[root@openstack-01 ~]# yum clean all
已加载插件:fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
正在清理软件源: base centos-ceph-hammer centos-openstack-mitaka centos-qemu-ev extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
[5]-  已杀死               yum update
[root@openstack-01 ~]# yum makecache
已加载插件:fastestmirror, langpacks
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 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/etcfor 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 find a valid baseurl for repo: base/7/x86_64

这时候我开始怀疑是不是我的yum所在的网络也存在问题

c、检测网络连通性状态,发现的确是网络存在问题

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
检查了网卡配置,发现DNS配置存在一些问题,手动修改并重置网卡信息,网络恢复正常
[root@openstack-01 ~]# yum clean all
已加载插件:fastestmirror, langpacks
正在清理软件源: base centos-ceph-hammer centos-openstack-mitaka centos-qemu-ev extras updates
Cleaning up everything
[root@openstack-01 ~]# yum -y install tree
已加载插件:fastestmirror, langpacks
base                                                                                                                         | 3.6 kB  00:00:00     
centos-ceph-hammer                                                                                                           | 2.9 kB  00:00:00     
centos-openstack-mitaka                                                                                                      | 2.9 kB  00:00:00     
centos-qemu-ev                                                                                                               | 2.9 kB  00:00:00     
extras                                                                                                                       | 3.4 kB  00:00:00     
updates                                                                                                                      | 3.4 kB  00:00:00     
(1/7): centos-ceph-hammer/7/x86_64/primary_db                                                                                |  30 kB  00:00:01     
(2/7): extras/7/x86_64/primary_db                                                                                            | 132 kB  00:00:00     
(3/7): updates/7/x86_64/primary_db                                                                                           | 4.9 MB  00:00:01     
(4/7): centos-openstack-mitaka/x86_64/primary_db                                                                             | 452 kB  00:00:04     
(5/7): base/7/x86_64/primary_db                                                                                              | 5.3 MB  00:00:07     
(6/7): base/7/x86_64/group_gz                                                                                                | 155 kB  00:00:15     
(7/7): centos-qemu-ev/7/x86_64/primary_db                                                                                    |  23 kB  00:00:16     
Determining fastest mirrors
 * base: mirrors.zju.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 tree.x86_64.0.1.6.0-10.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
====================================================================================================================================================
 Package                         架构                              版本                                       源                               大小
====================================================================================================================================================
正在安装:
 tree                            x86_64                            1.6.0-10.el7                               base                             46 k
事务概要
====================================================================================================================================================
安装  1 软件包
总下载量:46 k
安装大小:87 k
Downloading packages:
tree-1.6.0-10.el7.x86_64.rpm                                                                                                 |  46 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : tree-1.6.0-10.el7.x86_64                                                                                                        1/1 
  验证中      : tree-1.6.0-10.el7.x86_64                                                                                                        1/1 
已安装:
  tree.x86_64 0:1.6.0-10.el7                                                                                                                        
完毕!
[root@openstack-01 ~]# tree
.
├── anaconda-ks.cfg
├── keystonerc_admin
├── keystonerc_demo
├── packstack-answers-20160505-132946.txt
├── packstack-answers-20160505-134047.txt
├── packstack-answers-20160505-152256.txt
├── 345205254345205261
├── 346250241346235277
├── 350247206351242221
├── 345233276347211207
├── 346226207346241243
├── 344270213350275275
├── 351237263344271220
└── 346241214351235242
    ├── 346234252345221275345220215346226207344273266345244271
    └── 346234252345221275345220215346226207344273266345244271 2
10 directories, 6 files

免责声明:文章转载自《Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇pycharm+python+Django之web开发环境的搭建(windows)【Qt】QLabel实现的圆形图像下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

MySQL最新版本 MySQL5.7.11 批量自动化一键式安装(转)

--背景云端 以前都喜欢了源码安装MySQL,总觉得源码是高大上的事情,不过源码也需要时间,特别是make的时候,如果磁盘和cpu差的话,时间很长很长,在虚拟机上安装mysql尤其甚慢了。 现在业务发展了,开始在云上部署了,需要经常安装mysql,有的时候一次部署很多台,如果还是源码安装一个个去执行,效率就比较差了,所以准备采用更快效率的二进制来实现一键式...

redhat7.4切换yum源为免费源

1.redhat是Linux系统中付费的企业版,虽然安装什么是免费的,但是需要注册。 如果你有注册码,暂请出门左拐(我没有注册码,所以我也不会注册,不用往下看了)。 Linux系统收费版:RedHat 免费版:CentOS、ubuntu 2.安装时不会提醒你注册(没注意,可能会提示)。当你使用yum命令时,提示你redhat需要注册。 此时,我们就需要将y...

nginx实战

nginx介绍 http://nginx.org/ nginx安装(yum)  https://coding.net/u/aminglinux/p/nginx/git/blob/master/2z/nginx.repo 1.安装最新稳定版本,可以安装epel-release扩展源,但是用epel安装的这个版本比较老,我们这里用yum nignx源安装,...

RedHat 安装YUM软件

最近在虚拟机里搭建RedHat Enterprise Linux 6.0 X86_64位系统,在此机器上安装了Oracle11g数据库。其中在安装软件的时候,一般都是用的是RPM命令,但是有些软件包有依赖关系,因此安装是有顺序的。但是当你使用YUM命令进行安装软件的时候,就不会出现软件包依赖的问题,YUM它会帮你把所需的依赖包一并安装上。 接下来讲解Red...

Centos6安装MySQL5.7(yum方式)

1. 下载并安装用来配置mysql的yum源的rpm包 # 下载 wget http://repo.mysql.com/mysql57-community-release-el6-10.noarch.rpm # 安装 yum -y localinstall mysql57-community-release-el6-10.noarch.rpm #...

添加docker aliyun源

yum list docker-ce --showduplicates | sort -ryum install docker-ce-17.12.0.ce-1.el7.centos yum install docker-ce-19.03.5 docker-ce-cli-19.03.5 containerd.io CentOS 7(使用 yum 进行安装)...