今天在ubuntu安装ssh的时候报了下面的错误:
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
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