當我打開軟體中心時,我看不到任何應用程式。當我嘗試重新安裝時出現錯誤

當我打開軟體中心時,我看不到任何應用程式。當我嘗試重新安裝時出現錯誤

打開軟體中心時看不到應用程式。當我嘗試重新安裝時,我收到一條錯誤訊息:

E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 8394 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

請幫我解決上述問題。

答案1

探索與ps -fp8394.如果進程 8394 存在,則您(或unattended-updates)正在其他地方更新包裝系統。

如果進程 8394 不存在,則鎖定檔案可能是因突然重新啟動而中斷的更新留下的。如果是這樣,應該將其刪除,但您的包裝系統可能處於不一致的狀態。

sudo apt update
sudo apt upgrade
  

並閱讀錯誤訊息。

空的另一種解釋ps -fp8394可能是進程 8394 已完成,並刪除了鎖定檔案。

相關內容