执行命令安装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博客