sudo apt-get update 失败,无法正常工作

sudo apt-get update 失败,无法正常工作

仍是 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

相关内容