Ubuntu中针对问题 E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)的解决方案

一、问题描述:

在ubuntu中有时因为错误的操作,而导致在执行 sudo apt-get install xxxx出现如下错误:

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
     E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
     如下图所示:

二、原因与解决方案:

1. 原因

出现该问题的原因是apt还在运行中

2. 解决方案

2.1 杀掉所有的apt进程

通过下面的命令,查看apt的所有进程

ps -A | grep apt

从图中,显然我们能够看到存在的进程,然后执行下面的命令:

sudo kill -SIGKILL processnumber

其中processnumber就是2473,如下图执行过程,并再次查看便发现没有存在的进程的,这样就可以正常执行apt命令了!

原文地址:https://www.cnblogs.com/ilym/p/9514969.html

时间: 2024-10-03 23:54:13

Ubuntu中针对问题 E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)的解决方案的相关文章

ubuntu 报错E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unav E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process us

1.配置xshell,查看虚拟机中ubuntu中网络ip ifconfig 报错 Command 'ifconfig' not found, but can be installed with: sudo apt install net-tools 没有这个工具需要安装 net-tools 2.安装net-tools,报错 sudo apt install net-tools 注意:ubuntu 高版本,比如18..,都是apt,而不是apt-get 报错信息: E: Could not get

关于Ubuntu中E: Could not get lock /var/lib/dpkg/lock - open的三种解决方案

问题 在Ubuntu中,有时候运用sudo  apt-get install 安装软件时,会出现如下的情况: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 三种解决方案 这是由于apt

Ubuntu中出现“Could not get lock /var/lib/dpkg/lock”的解决方法

在运行Ubuntu安装软件,使用命令sudo  apt-get install时,有时会出现以下的错误: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 这个错误一般情况下是因为apt还在

【ubuntu 】常见错误--Could not get lock /var/lib/dpkg/lock

ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock 通过终端安装程序sudo apt-get install xxx时出错: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another

ubuntu更新出错--Could not get lock /var/lib/dpkg/lock

ubuntu在vps上安装好后,通常第一个命令是更新系统软件.然而在运行的过程中,却出现这样的错误: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 出现这个问题可能是有另外一个程序正在运

ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock

通过终端安装程序sudo apt-get install xxx时出错: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 出现这个问题可能是有另外一个程序正在运行,导致资源被锁不可用.而

(八)ubuntu安装软件提示:Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

question: [email protected]:/usr/src/Linux-headers-3.5.0-23-generic$ sudo apt-get install cheese [sudo] password for ubuntu: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to lock the administration di

ubuntu下安装软件Could not get lock /var/lib/dpkg/lock错误

今天在ubuntu安装ssh的时候报了下面的错误: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 查了一下,出现此错误的原因一是有别的资源在安装,二是上一次安装没有正常退出导致锁没有释

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

今天在Ubuntu 14.04下用apt-get目录安装SSH的时候发生了这个错误提示.经过一番查找了解可能发生的原因. 首先apt作为一个软件更新机制,每次运行的时候会对apt数据库加锁.当发生上面的错误提示的时候,应该先查找是哪条进程正在运行apt-get或者apt命令,比如系统更新之类. 解决办法其实有很多种. 首先,你确实没找到到底是哪条进程正在使用apt命令,那么你重启机器后应该就没问题了.可以在系统当前的进程中通过关键字查找筛选 ps aux | grep apt kill proc