Ubuntu常见错误汇总

1.用apt-get安装时报错

a@a:~$ sudo apt-get install xxx

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?

其实这是因为有另外一个程序在运行,导致锁不可用。原因可能是上次运行更新或安装没有正常完成。

 解决方法:

sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

一般用上面的方法就可以解决,但是有时候会出现另一个问题,解决方法

sudo dpkg --configure -a
sudo apt-get update

猜你喜欢

转载自blog.csdn.net/qq_24889575/article/details/81173231