错误1
通过终端安装程序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
错误2
出现错误:
The following packages have unmet dependencies:
解决方法:
sudo apt-get install -f
错误3
出现错误:
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
解决方法:
sudo lsof /var/cache/debconf/config.dat
sudo kill -9

这篇博客详细列举并解决了使用`apt-get`在Ubuntu中安装程序时遇到的六个常见错误,包括资源被锁、错误的源、软件安装失败等问题,并提供了相应的解决步骤。

1万+

被折叠的 条评论
为什么被折叠?



