debian/ubuntu解决 E: Could not get lock /var/lib/apt/lists/lock 问题

  • Home
  • 知识中心
  • debian/ubuntu解决 E: Could not get lock /var/lib/apt/lists/lock 问题

在更换软件源时遇到了如下问题:

sudo apt-get update
E: Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

 

表明当前有某个进程正在 apt-get,然而我并没有使用任何命令,于是需要 kill 掉进程。

解决方法是执行

sudo rm /var/lib/apt/lists/lock