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 ...
随机推荐
- 转:获取GridView中RowCommand的当前索引行
获取GridView中RowCommand的当前索引行 前台添加一模版列,里面添加一个LinkButton 前台 (如果在后台代码中用e.CommandArgument取值的话前台代码就必须在按钮中设 ...
- ogre3D学习基础9 -- 光源程序实例
这一章练习一下光源的使用,光源分为三种:点光源,聚光源,有向光.具体内容前面说过,这里就不解释了. 继续在上一章的程序的基础上实现. 1.创建摄像机(Camera) createCamera()函数是 ...
- PHP smarty模版引擎基本安装
环境: PHP5.2 以上版本 先去官网下载smarty模版引擎的库文件到你的电脑或服务器上 smarty官方网站库文件下载地址: https://www.smarty.net/download 下 ...
- adb pull 文件夹的时候注意
传说之美 分享快乐 记录生活 学习探索 博客园 首页 新随笔 联系 管理 订阅 随笔- 75 文章- 0 评论- 19 Android 用adb pull或push 拷贝手机文件到到电脑上,拷贝 ...
- 【java基础 12】HashMap中是如何形成环形链表的?
导读:经过前面的博客总结,可以知道的是,HashMap是有一个一维数组和一个链表组成,从而得知,在解决冲突问题时,hashmap选择的是链地址法.为什么HashMap会用一个数组这链表组成,当时给出的 ...
- Educational Codeforces Round 19 A+B+C+E!
A. k-Factorization 题意:将n分解成k个大于1的数相乘的形式.如果无法分解输出-1. 思路:先打个素因子表,然后暴力判,注意最后跳出的条件. int len,a[N],b[N]; v ...
- PTA 10-排序6 Sort with Swap(0, i) (25分)
题目地址 https://pta.patest.cn/pta/test/16/exam/4/question/678 5-16 Sort with Swap(0, i) (25分) Given a ...
- kb-07线段树-06离散化(与第四题类似)
/* zoj1610 这题是离散化,区间特殊查询的,和之前的第4 题是异曲同工的 */ #include<iostream> #include<cstdio> #include ...
- Java面试题之final、finally和finalize的区别
final: final是一个修饰符,可以修饰变量.方法和类,如果final修饰变量,意味着变量的值在初始化后不能被改变: 防止编译器把final域重排序到构造函数外:(面试的时候估计答出这个估计会加 ...
- 头脑王者pk答题小程序开发思路 微信pk答题小程序开发 PK答题游戏你也可以做 微信pk答题游戏
想必大家最近的朋友圈和微信群里都被头脑王者PK答题刷屏了吧.确实很好玩,尤其是2018年的这波风口,手机答题,大家掏出手机,创建一个好友PK,然后你的好友点击进来就可以和你一起PK答题.比之前的游戏好 ...