在Ubuntu中,有時候執行sudo apt-get install
命令安裝軟件時,會出現以下的情況
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?
原因是apt還在運行
解決方法:
運行命令
$ sudo rm /var/lib/apt/lists/lock
$ sudo rm /var/cache/apt/archives/lock