1. 程式人生 > >Ubuntu sudo apt-get install/remove 提示E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Ubuntu sudo apt-get install/remove 提示E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

後臺進程 rec inux 參考 ubuntu安裝 -a 兩個 使用 pid

提示這種錯誤表明有後臺進程使用apt-get。

解決方法1:

查看後臺進程ps -a | grep apt,顯示apt的pidnum

sudo kill -9 pidnum

參考:https://linux.cn/article-8040-1.html

解決方法2:

參考:https://www.cnblogs.com/KingMT/p/6081771.html

解決方法3:

我的ubuntu安裝在虛擬機上,前兩個方法均不管用。關機重啟,開機後系統提示更新,取消更新。再運行sudo apt-get install * 不再報錯了。之前報錯的原因是系統在後臺檢查更新。

Ubuntu sudo apt-get install/remove 提示E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?