Ubuntu 12.04 系统 Could not get lock /var/lib/dpkg/lock 解决方法
问题:
homer@homer-pc:~$ sudo apt-get install subversion
[sudo] password for homer:
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?
解决方法:
homer@homer-pc:~$ sudo rm /var/cache/apt/archives/lock
homer@homer-pc:~$ sudo rm /var/lib/dpkg/lock
结果:
homer@homer-pc:~$ sudo apt-get install subversion
参考:
通过终端安装程序 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
再试着安装,问题解决。
版权所有: 本文系米扑博客原创、转载、摘录,或修订后发表,最后更新于 2014-06-26 12:53:32
侵权处理: 本个人博客,不盈利,若侵犯了您的作品权,请联系博主删除,莫恶意,索钱财,感谢!
转载注明: Ubuntu 12.04 系统 Could not get lock /var/lib/dpkg/lock 解决方法 (米扑博客)