1. 程式人生 > >centos 下yum命令無法正常安裝docker問題

centos 下yum命令無法正常安裝docker問題

centos下yum無法安裝docker

docker安裝前檢查你對應centos版本,一般要高與3.8版本才支持
root@bogon ~]# uname -a
Linux bogon 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
在安裝docker時出現如下錯誤信息,
[root@bogon ~]# yum -y install docker
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 2310.

Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 292 M RSS (1.6 GB VSZ)
Started: Tue May 22 16:37:43 2018 - 02:11 ago
State : Sleeping, pid: 2310

排查問題方式
已經有一個yum進程在運行了,使用kill幹掉它:

[root@bogon ~]# kill -s -9 2310 -----------------發現kill 無法起效果

bash: kill: -9: invalid signal specification

暴力方式,可以通過強制關掉yum進程
[root@bogon ~]# rm -f /var/run/yum.pid

然後重新運行命令安裝,
[root@bogon ~]# yum -y install docker
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.163.com
  • epel: mirrors.tongji.edu.cn
  • extras: mirrors.aliyun.com
  • updates: mirrors.163.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package docker.x86_64 2:1.13.1-53.git774336d.el7.centos will be updated
    ---> Package docker.x86_64 2:1.13.1-63.git94f4240.el7.centos will be an update
    --> Processing Dependency: docker-common = 2:1.13.1-63.git94f4240.el7.centos for package: 2:docker-1.13.1-63.git94f4240.el7.centos.x86_64
    --> Processing Dependency: docker-client = 2:1.13.1-63.git94f4240.el7.centos for package: 2:docker-1.13.1-63.git94f4240.el7.centos.x86_64
    --> Running transaction check
    ---> Package docker-client.x86_64 2:1.13.1-53.git774336d.el7.centos will be updated
    ---> Package docker-client.x86_64 2:1.13.1-63.git94f4240.el7.centos will be an update
    ---> Package docker-common.x86_64 2:1.13.1-53.git774336d.el7.centos will be updated
    ---> Package docker-common.x86_64 2:1.13.1-63.git94f4240.el7.centos will be an update
    --> Processing Dependency: container-storage-setup >= 0.9.0-1 for package: 2:docker-common-1.13.1-63.git94f4240.el7.centos.x86_64

centos 下yum命令無法正常安裝docker問題