• No packages marked for update


    问题:用yum安装docker,更新yum存储时,报以下错误,导致yum坏了

    [root@localhost yum.repos.d]# vi docker.repo
    [root@localhost yum.repos.d]# yum update
    Loaded plugins: fastestmirror, langpacks
    base                                                     | 3.6 kB     00:00
    dockerrepo                                               | 2.9 kB     00:00
    extras                                                   | 3.4 kB     00:00
    updates                                                  | 3.4 kB     00:00
    dockerrepo/7/primary_db                                    |  34 kB   00:00
    Loading mirror speeds from cached hostfile
     * base: mirrors.cn99.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.cn99.com
    No packages marked for update

    解决方法:重新安装yum

    [root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps  
    [root@localhost ~]# rpm -qa |grep yum 
    [root@localhost ~]# wget http://centos.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    [root@localhost ~]# wget http://centos.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
    [root@localhost ~]# wget http://centos.ustc.edu.cn/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm
    [root@localhost ~]# rpm -ivh yum-*
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:yum-metadata-parser-1.1.4-10.el7 ################################# [ 33%]
       2:yum-plugin-fastestmirror-1.1.31-4################################# [ 67%]
       3:yum-3.4.3-154.el7.centos         ################################# [100%]
    [root@localhost ~]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
    [root@localhost ~]# yum makecache
    Loaded plugins: fastestmirror
    base                                                     | 3.6 kB     00:00
    extras                                                   | 3.4 kB     00:00
    updates                                                  | 3.4 kB     00:00
    (1/8): extras/7/x86_64/other_db                            | 108 kB   00:00
    (2/8): extras/7/x86_64/filelists_db                        | 636 kB   00:01
    (3/8): updates/7/x86_64/prestodelta                        | 771 kB   00:01
    (4/8): extras/7/x86_64/prestodelta                         | 102 kB   00:02
    (5/8): updates/7/x86_64/other_db                           | 621 kB   00:00
    (6/8): updates/7/x86_64/filelists_db                       | 3.5 MB   00:06
    (7/8): base/7/x86_64/filelists_db                          | 6.7 MB   00:08
    (8/8): base/7/x86_64/other_db                              | 2.5 MB   00:09
    Loading mirror speeds from cached hostfile
     * base: mirrors.163.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.cn99.com
    Metadata Cache Created
  • 相关阅读:
    rsync备份服务
    Linux命令行基础及基础命令
    Linux重要目录及文件
    shell编程基础
    学习与生活
    从0开始使用python flask编写博客网站(2)
    python 七牛云图床的使用
    从0开始使用python flask编写博客网站(1)
    如何学习编程 我的编程学习之路
    Pyqt5 基本布局方式
  • 原文地址:https://www.cnblogs.com/zhuhaichan/p/8493217.html
Copyright © 2020-2023  润新知