zoukankan      html  css  js  c++  java
  • Another app is currently holding the yum lock; waiting for it to exit...

    CentOS7下yum升级被PackageKit锁定(docker1)

    新安装centos7后,第一次升级出现下面的错误

    Another app is currently holding the yum lock; waiting for it to exit...
      另一个应用程序是:PackageKit
        内存:113 M RSS (535 MB VSZ)
        已启动: Sat Mar 14 11:45:39 2020 - 05:16之前
        状态  :睡眠中,进程ID:3178
    PackageKit是一个离线更新服务,基本没啥用途,应该永久禁用。
    centos7下,打开:
    etc/yum/pluginconf.d/langpacks.conf
    将第一行:enable=1改为enable=0
    保存后再执行yum安装就不会被锁定了

    一:docker安装脚本:
    #!/bin/bash
    echo "11111"
    yum install -y yum-utils device-mapper-persistent-data lvm2
    echo "22222"
    yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    echo "33333"
    yum makecache fast
    yum -y install docker-ce
    echo "44444"
    systemctl enable docker
    systemctl start docker
    echo "55555"
    docker version
    echo "66666"
    docker run hello-world
    问题2:运行docker run hello-world报错
    Unable to find image 'hello-world:latest' locally
    docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
    See 'docker run --help'.
    /etc/docker/daemon.json更换镜像https://registry.docker-cn.comhttp://hub-mirror.c.163.com
    {
    "registry-mirrors":["http://hub-mirror.c.163.com"]
    }

    执行docker run hello-world打印日志如下 ,打印成功Hello from Docker!

    [root@localhost ~]# docker run hello-world
    Unable to find image 'hello-world:latest' locally
    latest: Pulling from library/hello-world
    1b930d010525: Pull complete 
    Digest: sha256:f9dfddf63636d84ef479d645ab5885156ae030f611a56f3a7ac7f2fdd86d7e4e
    Status: Downloaded newer image for hello-world:latest
    
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    
    To generate this message, Docker took the following steps:
     1. The Docker client contacted the Docker daemon.
     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
        (amd64)
     3. The Docker daemon created a new container from that image which runs the
        executable that produces the output you are currently reading.
     4. The Docker daemon streamed that output to the Docker client, which sent it
        to your terminal.
    
    To try something more ambitious, you can run an Ubuntu container with:
     $ docker run -it ubuntu bash
    
    Share images, automate workflows, and more with a free Docker ID:
     https://hub.docker.com/
    
    For more examples and ideas, visit:
     https://docs.docker.com/get-started/
    
    [root@localhost ~]# 
    docker可以正常使用
  • 相关阅读:
    SpringBoot Schedule 配置
    ElasticSearch与Spring Boot集成问题
    Mybaits使用
    Java生成随机验证码
    Netty-FastThreadLocal快在哪里呢?
    直方图反向投影学习-----个人理解(你究竟是不是凶手)
    zookeeper启动报 Unexpected exception, exiting abnormally 错误
    upload三种上传方式(上)---Servlet---post---commons-fileupload.1.2.1.jar方式请求上传文件
    request.getRealPath为什么会被代替
    Java2E中的路径问题
  • 原文地址:https://www.cnblogs.com/security-guard/p/12491388.html
Copyright © 2011-2022 走看看