![](https://seccdn.libravatar.org/avatar/e7f8a6450b901ef889d10b1dd7b05765.jpg?s=120&d=mm&r=g)
Hi. working with apt throught webmin, sometimes I get these messages: --- error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages index using db3 - Operation not permitted (1) error: cannot open Packages database in /var/lib/rpm --- I think that's probably a mistake of mine (maybe launching apt from two sessions :-(), still, is there any way to figure out who or what is locking a specific file? regards, ===== Riccardo G. Facchini
![](https://seccdn.libravatar.org/avatar/4380f8af3f24b864248651cab2fea673.jpg?s=120&d=mm&r=g)
Hi Riccardo, [ snip ]
--- I think that's probably a mistake of mine (maybe launching apt from two sessions :-(), still, is there any way to figure out who or what is locking a specific file?
[ snip ] You answered yourself ;) you cannot run 'rpm' twice at the same time... To see which files are being locked/used, try lsof HTH, Martin
![](https://seccdn.libravatar.org/avatar/e7f8a6450b901ef889d10b1dd7b05765.jpg?s=120&d=mm&r=g)
--- Martin Mielke <__> wrote:
Hi Riccardo,
[ snip ]
--- I think that's probably a mistake of mine (maybe launching apt from two sessions :-(), still, is there any way to figure out who or what is locking a specific file?
[ snip ]
You answered yourself ;) you cannot run 'rpm' twice at the same time...
To see which files are being locked/used, try lsof
HTH, Martin
[snip] sorry, I probably mis-written the question. I was trying to figure out who was locking the file and I wasn't able to find what happened to that particular process, so I described what was going on. the right question was: how to figure out who is locking/using a file? thanks for your answer. Is the one I was looking for. regards, ===== Riccardo G. Facchini
![](https://seccdn.libravatar.org/avatar/6d198f8c8f1c94ccef873cebcf4f5dfa.jpg?s=120&d=mm&r=g)
Riccardo Facchini wrote:
--- Martin Mielke <__> wrote:
Hi Riccardo,
[ snip ]
--- I think that's probably a mistake of mine (maybe launching apt from
two
sessions :-(), still, is there any way to figure out who or what is locking a specific file?
[ snip ]
You answered yourself ;) you cannot run 'rpm' twice at the same time...
To see which files are being locked/used, try lsof
HTH, Martin
[snip]
sorry, I probably mis-written the question. I was trying to figure out who was locking the file and I wasn't able to find what happened to that particular process, so I described what was going on.
the right question was: how to figure out who is locking/using a file?
thanks for your answer. Is the one I was looking for.
regards,
===== Riccardo G. Facchini
lsof
participants (3)
-
Martin Mielke
-
Riccardo Facchini
-
Sid Boyce