博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu安装软件太慢中断出现Could not get lock /var/lib/dpkg/l
阅读量:6802 次
发布时间:2019-06-26

本文共 1328 字,大约阅读时间需要 4 分钟。

hot3.png

I am not sure if it will work, but try this. First you need to uninstall anything that is related to mysql:

sudo apt-get purge mysql*sudo apt-get autoremovesudo apt-get autoclean

Then the important bit, this error could be caused because your distribution is not upgraded recently, or at least conflicts are not resolved properly. So next thing is to upgrade it like you did before but without removing first:

sudo apt-get dist-upgrade

Now after this is done, you can try to install mysql as normal again. Hope this will work, please give a report. If it doesnt work we'll try another fix.

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

 

出现这个问题可能是有另外一个程序正在运行,导致资源被锁不可用。而导致资源被锁的原因可能是上次运行安装或更新时没有正常完成,进而出现此状况,解决的办法其实很简单:

 

在终端中敲入以下两句

 

sudo rm /var/cache/apt/archives/lock

 

sudo rm /var/lib/dpkg/lock

 

sudo dpkg --configure -a        //自动调试

 

 

出现After this operation, 0 B of additional disk space will be used.Do you want to continue [Y/n]?

解决方法

cd /var/lib/dpkg

sudo mv info info.bak
sudo mkdir info
然后apt-get install 或者 apt-get upgrade
再把info替换回去应该就可以了

 

or

    apt-get install -f

 

转载于:https://my.oschina.net/u/2615687/blog/616369

你可能感兴趣的文章
python下的MySQLdb使用
查看>>
CCNP路由实验---4、配置EIGRP不等价均衡
查看>>
Fedora20下安装vim
查看>>
CentOS 6.5 使用docker 容器
查看>>
pl/sql中的exception
查看>>
Android开发:通过AdbWireless,不用数据线连接到安卓手机进行调试
查看>>
组策略对应于注册表位置汇总
查看>>
Java虚拟机参数配置
查看>>
RHCE 学习笔记(31) - 防火墙 (中)
查看>>
XSS研究4-来自外部的XSS攻击的防范
查看>>
Spring知识点总结-1
查看>>
微软私有云分享(R2)21 BMC提升B格
查看>>
MDSF:如何使用GMF来做TOGAF建模工具
查看>>
Spring Security简介
查看>>
打造一流的研发中心
查看>>
MCollective架构篇3-Puppet插件的部署及测试
查看>>
配置GNS使用CRT连接
查看>>
Java:集合类性能分析
查看>>
创建Server 2012 VHDX虚拟磁盘模板
查看>>
IE调试网页之五:使用 F12 开发人员工具调试 JavaScript 错误 (Windows)
查看>>