alexander@alexander-virtual-machine:~$ sudo apt-get install -y httpd
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

 

但是这样不能解决问题:可能还会出现问题,解决方案:

1,sudo dpkg --configure -a

 

2,sudo apt-get update

 

相关文章:

  • 2021-07-29
  • 2022-12-23
  • 2022-03-06
  • 2021-05-22
  • 2021-07-01
  • 2022-12-23
  • 2021-08-13
猜你喜欢
  • 2021-09-17
  • 2021-12-01
  • 2021-05-07
  • 2021-06-22
  • 2021-07-26
  • 2022-12-23
  • 2021-06-01
相关资源
相似解决方案