I often fail to run apt-get install on my server. Like that:
$ sudo apt-get install tmux
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?
Happens a lot, almost every day. Whenever I try to find out who else is locking it with the lsof
command, then I am too late and the lock is already gone. Really very weird.
Is there a trick, how I can record for over 24 hrs who else is locking /var/lib/dpkg/lock
?