![sudo apt-get update 失败,无法正常工作](https://linux22.com/image/1085866/sudo%20apt-get%20update%20%E5%A4%B1%E8%B4%A5%EF%BC%8C%E6%97%A0%E6%B3%95%E6%AD%A3%E5%B8%B8%E5%B7%A5%E4%BD%9C.png)
仍是 Linux 新手,正在尝试 Ubuntu。能够安装它,但是当我尝试使用 $ 在终端中更新时,sudo apt-get update
我得到以下信息:
wave@Wave:~$ 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/
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?
答案1
sudo lsof /var/lib/dpkg/lock
( man lsof
) 将显示已打开文件的所有进程。在我的系统上(YMMV),synaptic
运行:
$ sudo lsof /var/lib/dpkg/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
synaptic 14382 root 15uW REG 8,6 0 424990 /var/lib/dpkg/lock