ubuntu 常見錯誤–Could not get lock /var/lib/dpkg/lock
經過終端安裝程序sudo apt-get install xxx或者apt-get update時出錯:ubuntu
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/lock
再試着安裝,問題解決。資源