在運行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還在運行所導致的,因此可以通過殺死所有的apt進程來解決。
方法:
1、在終端輸入 ps afx|grep apt,查看當前apt進程;
2、在終端輸入 sudo kill -9 xxxx (xxxx是apt進程號)
3、殺死所有apt進程后再執行sudo apt-get install即可。