当我们执行更新命令遇到锁住问题时,用以下方法杀死进程
john@ubuntu:~$ sudo apt-get update
Reading package lists… Done
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1406 (packagekitd)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/
john@ubuntu:~$ ps -e | grep apt
john@ubuntu:~$ ps afx | grep apt
6794 pts/0 S+ 0:00 | _ grep --color=auto apt
john@ubuntu:~$ sudo kill -9 6794
kill: (6794): No such process
john@ubuntu:~$ sudo kill -9 1406
john@ubuntu:~$ sudo apt-get update