轉自博客:https://www.cnblogs.com/yun6853992/p/9343816.html
問題原因:主要是因爲apt還在運行。
解決方案:殺死所有的apt進程。查找所有apt相關的進程,並用命令殺死。如下。
hlp@hlp-Lenovo-G405:~$ ps afx|grep apt
pts/0 S+ 0:00 \_ grep --color=auto apt
? Ss 0:00 /bin/sh /usr/lib/apt/apt.systemd.daily install
? S 0:00 \_ /bin/sh /usr/lib/apt/apt.systemd.daily lock_is_held install
hlp@hlp-Lenovo-G405:~$ sudo kill -9 2873
hlp@hlp-Lenovo-G405:~$ sudo kill -9 2869