1. 程式人生 > >關於Ubuntu中Could not get lock /var/lib/dpkg/lock解決方案

關於Ubuntu中Could not get lock /var/lib/dpkg/lock解決方案

dmi 方案 殺死進程 class 關於 OS 鎖死 解決方案 序號

如果運行sudo apt-get install*****,出現:

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?

就是因為apt還在運行,那就結束apt進程運行,有兩種方法:

一:

查看apt進程:

  ps -A|grep apt

殺死進程:

  sudo kill -num(進程前面序號)

二:

刪除鎖死文件:

   sudo rm /var/lib/dpkg/lock

然後重新配置和更新軟件包

  sudo dpkg --configure -a

  sudo apt-ge update

關於Ubuntu中Could not get lock /var/lib/dpkg/lock解決方案