ubuntu常見錯(cuò)誤--Could not get lock /var/lib/dpkg/lock解決
通過終端安裝程序sudo apt-get install xxx時(shí)出錯(cuò):
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
出現(xiàn)這個(gè)問題可能是有另外一個(gè)程序正在運(yùn)行性锭,導(dǎo)致資源被鎖不可用哲身。而導(dǎo)致資源被鎖的原因可能是上次運(yùn)行安裝或更新時(shí)沒有正常完成悦穿,進(jìn)而出現(xiàn)此狀況昂羡,解決的辦法其實(shí)很簡(jiǎn)單:
在終端中敲入以下兩句
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock