Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)

执行命令安装docker引擎moby-engine时,可能由于网络出错,造成与服务器断连,要求重新输入账户名和密码。

再次重新安装引擎,系统提示如下报错。

sudo apt-get install moby-engine
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

可能由于进程被占用。首先更新。

sudo apt-get update

sudo rm /var/lib/dpkg/lock-frontend

sudo rm /var/lib/dpkg/lock

再次重新安装,仍然报错。

sudo apt-get install moby-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-azure-5.4-cloud-tools-5.4.0-1059 linux-azure-5.4-cloud-tools-5.4.0-1061 linux-azure-5.4-headers-5.4.0-1059 linux-azure-5.4-headers-5.4.0-1061 linux-azure-5.4-tools-5.4.0-1059 linux-azure-5.4-tools-5.4.0-1061
  linux-cloud-tools-5.4.0-1061-azure linux-headers-5.4.0-1061-azure linux-image-5.4.0-1061-azure linux-modules-5.4.0-1061-azure linux-modules-extra-5.4.0-1061-azure linux-tools-5.4.0-1061-azure
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  moby-buildx moby-cli moby-containerd moby-runc pigz
Suggested packages:
  aufs-tools cgroupfs-mount | cgroup-lite
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

这次再删掉相关内容,更新系统,则可顺利安装。

sudo rm -rf /var/cache/apt/archives/lock

sudo apt-get update

参见: 

关于deepin下安装ATOM报错 E: Unable to lock directory /var/cache/apt/archives/_我超级喜欢赵方婧的-CSDN博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值