Ubuntu常見錯誤--Could not get lock /var/lib/dpkg/lock解決

ubuntu常見錯誤--Could not get lock /var/lib/dpkg/lock解決ubuntu

經過終端安裝程序sudo apt-get install xxx時出錯:bash

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

出現這個問題多是有另一個程序正在運行,致使資源被鎖不可用。而致使資源被鎖的緣由多是上次運行安裝或更新時沒有正常完成,進而出現此情況,解決的辦法其實很簡單,在終端中敲入如下兩句:code

sudo rm /var/cache/apt/archives/lock

sudo rm /var/lib/dpkg/loc
相關文章
相關標籤/搜索