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

简介: 首次安装docker时出现的异常问题。

问题描述
看官方手册教程去操作 → https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

    在新主机上首次安装Docker Engine之前,需要设置Docker存储库。我使用的虚拟机。
$ sudo apt-get update

$ sudo apt-get install ca-certificates curl gnupg

执行上面两个命令,第一个命令没什么问题,第二个命令就会出现异常:
image.png
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?
为啥会出现这个bug我也懒得写了,反正看见异常bug就很烦,但是解决这个异常bug非常简单。

解决方法
将报错的文件删除即可,输入下面两个命令:

温馨提示:我输入第一个命令就解决了。


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

然后重新输入指令 sudo apt-get install ca-certificates curl gnupg 执行即可
image.png

执行过程中需要输入 y


image.png
目录
相关文章
|
Shell Docker 容器
解决:E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
为了让容器服务启动更加方面,于是自己手写了一个 docker-compose.yml 配置脚本。脚本内容如下:
2085 0
|
3月前
|
iOS开发 Perl
解決pod install报错:unable to access: LibreSSL SSL_read: error:Operation timed out, errno 60
解決pod install报错:unable to access: LibreSSL SSL_read: error:Operation timed out, errno 60
84 0
|
6月前
Another app is currently holding the yum lock; waiting for it to exit
Another app is currently holding the yum lock; waiting for it to exit
27 0
|
6月前
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
|
6月前
yum 报错:Another app is currently holding the yum lock; waiting for it to exit
开发过程中需要用到 yum 命令 有时候执行 yum 会报错如下
61 0
|
缓存 Ubuntu Linux
错误 E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
错误 E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
Install fail! Error: EBUSY: resource busy or locked, symlink
Install fail! Error: EBUSY: resource busy or locked, symlink
110 0
|
开发工具 git
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
error: could not lock config file .git/config: Permission denied/Command failed with exit 255
396 0
解决办法:无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
解决办法:无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
148 0
|
Android开发
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
431 0
解析Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]