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

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

文章目录:

  • 一、错误原因
  • 二、错误解决方式:[参考](https://www.linuxidc.com/Linux/2014-06/103437.htm)
    • 1、用kill杀进程
    • 2、删除锁定文件


在用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

问题解决
在这里插入图片描述



在这里插入图片描述
♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠

你可能感兴趣的:(16_各种错误和bug(你的痛,我的痛,痛痛痛))