解决0% [Waiting for headers] 导致的unable to lock the administration directory (/var/lib/dpkg/) is anothe

Posted Criya

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决0% [Waiting for headers] 导致的unable to lock the administration directory (/var/lib/dpkg/) is anothe相关的知识,希望对你有一定的参考价值。

这是我在配置vim的YouCompleteMe时遇到的问题,我需要使用CMake来编译YCM。

在我输入

$ sudo apt install cmake

 

由于网络原因导致安装一直卡在0% [Waiting for headers]

在我多次尝试后发现报错unable to lock the administration directory (/var/lib/dpkg/) is another process using it

安装进程已经被锁死,这时只需与删掉apt下的生成的死锁文件就好了。

$ sudo rm /var/lib/apt/lists/lock
$ sudo rm /var/cache/apt/archives/lock

 

这时就可以去处理 [Waiting for headers]的问题,这是之前某次安装不成功遗留下的问题,只需要

$ sudo rm -rf /var/cache/apt/archives/

 

最后更新一下软件包就可以了

$ sudo apt update

 

以上是关于解决0% [Waiting for headers] 导致的unable to lock the administration directory (/var/lib/dpkg/) is anothe的主要内容,如果未能解决你的问题,请参考以下文章

MySQL出现Waiting for table metadata lock的原因以及解决方法

memcache异常错误:net.spy.memcached.OperationTimeoutException: Timeout waiting for value 解决分析

memcache异常错误:net.spy.memcached.OperationTimeoutException: Timeout waiting for value 解决分析

memcache异常错误:net.spy.memcached.OperationTimeoutException: Timeout waiting for value 解决分析

异常篇 - Waiting for Debugger 解决

MySQL Waiting for table metadata lock的解决方法