COULD NOT LOCK /VAR/LIB/DPKG/LOCK – OPEN
无法锁定/VAR/LIB/DPKG/LOCK-OPEN
A very common error while installing an application or updating a package is following:
在安装应用程序或更新软件包时,常见的错误如下:
E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
E: 未能获得 lock/var/lib/dpkg/lock-open (11: 资源暂时不可用)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
E: 无法锁定管理目录(/var/lib/dpkg/) ,是否有其他进程在使用它?
The reason is quite obvious from the error itself “another process using it”. Which means another process is already using the mentioned directory (necessary for the application to be installed) through Synaptic Package Manager, Update Manger, terminal or Ubuntu Software Center.
原因很明显,从错误本身“另一个使用它的进程”来看。这意味着另一个进程已经在使用上面提到的目录(对于安装应用程序来说是必需的) ,通过 Synaptic 文件夹、更新管理器、终端或 Ubuntu 软件中心。
The idea would be to look for another application which is being installed or update it. Wait for it to finish the installation or cancel it. If you cannot see the application then try running this command in the terminal to solve this error:
这个想法是寻找另一个正在安装或更新的应用程序。等待它完成安装或取消安装。如果你看不到应用程序,那么试着在终端中运行这个命令来解决这个错误:
sudo rm /var/lib/apt/lists/lock