2

I'm getting the error when I run sudo apt upgrade:

Citing for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 12111 (synaptic)...4s

So, I tried sudo lsof /var/lib/dpkg/lock-frontend, and got this:

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse file system /run/user/1000/doc
      Output information may be incomplete.
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
synaptic 12111 root   11uW  REG    8,5        0 49152209 /var/lib/dpkg/lock-frontend

I'm not sure what is happening here. All I ever did was to remove a broken package. You can check my previous question for that. But how do I solve this cache lock problem?

0

1 Answer 1

1

I had the same problem while installing chromium through console. I also had Synaptic package manager and Ubuntu software open simultaneously. I'm no Linux pro but it seems to me that you can't install apps through console if you have other package managers open. After closing everything but the console the installation worked.

1
  • This is correct. The first package manager gets to hold the lock until it's closed. All other package managers are locked out (that's why it's called a "lock") until the lock is released. This protects users from many kinds of folly.
    – user535733
    Feb 17, 2022 at 1:47

Not the answer you're looking for? Browse other questions tagged .