7_Ubuntu用apt-get安装报错:E: Could not get lock /var/lib/dpkg/lock-frontend - open (11:资源暂时不可用)(20190215)

版权声明:本文为博主原创文章,转载而不修改内容请留言告知,转载并修改内容请与我联系 https://blog.csdn.net/weixin_41010198/article/details/87347257

Ubuntu用apt-get安装报错:E: Could not get lock /var/lib/dpkg/lock-frontend - open (11:资源暂时不可用)(20190215)

文章目录:


在用Linux中使用apt-get安装时报错,网上给出的两种方法,一种是杀apt-get进程,一种是删除锁定文件,我是用后者解决的!!!


一、错误原因

错误:

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?

在这里插入图片描述

二、错误解决方式:参考

1、用kill杀进程

一开始用kill杀进程,怎么也杀不死,后来加了强制参数杀死

kill -9 pid

在这里插入图片描述
虽然apt-get进程杀死了,但是用apt-get安装库包依旧会报错,下面用第二种方式解决,如下2

2、删除锁定文件

就是上面错误信息中路径的文件
注意:
不同主机中这个路径可能不一样,根据自己报错信息中的路径为准

sudo rm /var/lib/dpkg/lock

问题解决

猜你喜欢

转载自blog.csdn.net/weixin_41010198/article/details/87347257