0

I was trying to install git in my Ubuntu 22.04.3 LTS.

  • After using "sudo apt update" command.
  • I used "sudo apt upgrade -y" cmd.
  • Then it displayed this message -> "Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 5847 (aptd)"

1 Answers1

1

Error Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend says that your operation sudo apt update probally is not finished. Check for process with id 5847 by running in terminal ps -p 5847. You will see what process prevents you from upgrading. You can wait until it finishes, but if you are sure that it is a mistake, you can restart your laptop or pc and lock error will disappear, so you can continue installing git. But I strongly recommend to wait until previous operation is finished.

Mike
  • 11