Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?
I see pretty much all the answers recommend deleting the lock. I don't recommend doing that as a first measure; maybe if there is no alternative. The lock is placed when an apt process is running, and is removed when the process completes. If there is a lock with no apparent process running, this may mean the process got stuck for some reason.
If you try
ps aux | grep apt
that will catch processes containing the word apt
, at least. If you see an apt-get
process or an aptitude
process that looks stuck, you can try
kill processnumber
and if that doesn't work try
kill -9 processnumber
This should kill the process and may remove the lock. Killing an apt
or aptitude
process is harmless unless it is actually in the middle of package installation. In any case, if the process got stuck, you probably don't have a choice but to kill it.
Killing a dpkg
process directly, if present, is not a good idea, because if dpkg
is active, it is probably manipulating the package database, and killing it may leave the package database in an inconsistent state; i.e. corrupted.
Killing an apt-get
or aptitude
process is in general much safer.
Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?的更多相关文章
- 解决0% [Waiting for headers] 导致的unable to lock the administration directory (/var/lib/dpkg/) is another process using it
这是我在配置vim的YouCompleteMe时遇到的问题,我需要使用CMake来编译YCM. 在我输入 $ sudo apt install cmake 由于网络原因导致安装一直卡在0% [Wait ...
- 解决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的时候特别是安装或更新的时候会出现下面的情况: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource t ...
- 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?
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to l ...
- E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
sudo rm /var/lib/dpkg/locksudo dpkg --configure -a
- Unable to lock the administration directory (/var/lib/dpkg/),is another process using it?
Description:无法获得锁 /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)Unable to lock the ...
- 修复 Ubuntu 中“Unable to lock the administration directory (/var/lib/dpkg/)”
在 Ubuntu 或者它的衍生版如 Linux Mint(我已经作为日常工作使用的系统)中使用 apt-get 命令或者其相对更新的APT 管理工具时,你可能会在命令行中看到一个 unable to ...
- Fix "Unable to lock the administration directory (/var/lib/dpkg/)" in Ubuntu
While using the apt-get command or the relatively new APT package management tool in Ubuntu Linux or ...
- E: Unable to lock the administration directory (/var/lib/dpkg/)
如何修复 Ubuntu 中的“Unable to lock the administration directory (/var/lib/dpkg/)” 在 Ubuntu 或者它的衍生版如 Linux ...
- 解决 unable to lock the administration directory (/var/lib/dpkg/) 问题
阿里开源镜像站提供了raspbian的软件包镜像,国内的用户可以选择改用阿里镜像站作为更新源. 但是在更换源之后,执行 sudo apt-get update && apt-get u ...
随机推荐
- 【Open-Falcon】Linux下安装Open-Falcon
一.Open-Falcon组件简述 [Open-Falcon绘图相关组件] Agent: 部署在目标机器采集机器监控项 Transfer : 数据接收端,转发数据到后端Graph和Judge Gra ...
- dubbo Protocol实现剖析
title: dubbo Protocol实现剖析 date: 2018-09-09 19:10:07 tags: --- 2.6.3版本,之前读的是2.4.9版本 本篇主要阐述dubbo rpc的c ...
- selenium - 常用页面操作
# 2.常用页面操作 # 访问某一个页面url = 'http://www.baidu.com'driver.get(url) # 获取页面的标题title = driver.titleprint(t ...
- [python学习篇][廖雪峰][1]高级特性--创建生成器 方法1 a = (x for x in range(1,3))
创建一个生成器的方法: for x in range(1,10000000) ,先生成一个列表[1........9999999] 如果我们只想要后面的几个元素,会发现浪费很多空间.所以,如果列表元素 ...
- pl/sql 函数及与存储过程的区别
函数用于返回特定的数据,当建立函数时,在函数头部必须包含return子句.而在函数体内必须包含return语句返回的数据.我们可以使用create function来建立函数. 1).接下来通过一个案 ...
- Jeddict研究过程中的总结
一.与作者交流的总结 说来也是惭愧,没有太多的经验,先给大家贴两张图,看看大家能不能发现问题: 在最开始的时候,都处于Gaurav Gupta让我给材料的过程,因为我不是缺这个就是缺那个,根本说不清楚 ...
- Java分页内容实例详解
首先定义一个fruit表,表里含有很多数据: 定义一个数据文件: public class Fruit { public String getIds() { return ids; } public ...
- html 文本标签
文本格式化标签 标签 描述 <b> 定义粗体文本. <big> 定义大号字. <em> 定义着重文字. <i> 定义斜体字. <small> ...
- [luoguP2463] [SDOI2008]Sandy的卡片(后缀数组 + st表)
传送门 很容易想到,题目中的相同是指差分数组相同. 那么可以把差分数组连起来,中间加上一个没有出现过的且字典序小的数 双指针移动,用st表维护height数组中的最小值. 当然用单调队列应该也可以且更 ...
- YY的GCD(bzoj 2820)
Description 神犇YY虐完数论后给傻×kAc出了一题给定N, M,求1<=x<=N, 1<=y<=M且gcd(x, y)为质数的(x, y)有多少对kAc这种 傻×必 ...