advait@advait-Bravo-15-A4DDR:~$ sudo apt install ubuntu-restricted-extras
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (synaptic)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (synaptic)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (synaptic)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (synaptic)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (synaptic)
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (synaptic) 2 3 Answers
Close synaptic package manager, and the "sudo apt install" command will automatically continue.
You cannot have two different applications that work with the APT package management system open at the same time.
Yes, I very frequently see the same messages as you ;)
0This answer on Unix & Linux SE by Stéphane Chazelas has some useful commands:
1If you want to kill processes based on their name or argument list, use pkill.
pkill regexpWill kill all processes whose name matches the regexp extended regular expression.
pkill -f regexpWill kill all processes whose list of arguments (including the first which usually contains the command name) concatenated with spaces matches the regexp.
You can force close the process by using the process id.
If your terminal says,
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 43843 (synaptic)Then, the process id in your case is 43843.
To kill the process use this command,
sudo kill 43843 2