Opam is always locked by a lock file

973 views Asked by At

I am having trouble with opam and lock files.

chris@chris:~$ opam upgrade
Another process (19525) has already locked "/home/chris/.opam/4.00.1/lock". Retrying in 1s (0/5)
Another process (19525) has already locked "/home/chris/.opam/4.00.1/lock". Retrying in 1s (1/5)
Another process (19525) has already locked "/home/chris/.opam/4.00.1/lock". Retrying in 1s (2/5)
Another process (19525) has already locked "/home/chris/.opam/4.00.1/lock". Retrying in 1s (3/5)
Another process (19525) has already locked "/home/chris/.opam/4.00.1/lock". Retrying in 1s (4/5)
'opam upgrade' failed.
# opam-version    1.1.0
# os              linux
Too many attempts. Cancelling.

I'm not really sure what the issue could be. I am fairly inexperienced with the entire system. I don't think it has anything to do with aspcud, as I do not have it installed. The machine I am using is running Ubuntu 13. Thanks guys.

EDIT:

I have tried to reboot and this is what happens when i try and kill the process

chris@chris:~/dev$ kill 19525
bash: kill: (19525) - No such process
1

There are 1 answers

0
camlspotter On BEST ANSWER

It seems that an opam process made a lock file then died unexpectedly somehow leaving the lock file /home/chris/.opam/4.00.1/lock .

If you are sure there is no opam process is running, just remove the lock file. Especially you have rebooted the machine so it is completely safe to remove the file.