最近在Ubuntu 服务器上安装包的时候出现了一个异常,采用的是 apt-get install 方式 。

 

异常详细信息如下:

 

dpkg status database is locked by another process

 

原因是包管理器没有正确关闭。需要重启计算机或者重新打开终端 输入:

 

sudo rm /var/lib/dpkg/lock

 

sudo dpkg --configure -a

 

然后重新安装包。


From:http://www.2cto.com/os/201305/208284.html