Opam总是被锁定文件锁定

时间:2013-12-26 03:00:17

标签: ocaml opam

我遇到了opam和锁定文件的问题。

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.

我不确定问题是什么。我对整个系统缺乏经验。我不认为它与aspcud有任何关系,因为我没有安装它。我正在使用的机器正在运行Ubuntu 13。 多谢你们。

编辑:

我试图重启,这就是当我尝试杀死进程时会发生的事情

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

1 个答案:

答案 0 :(得分:5)

似乎一个opam进程发出了一个锁定文件,然后意外地以某种方式丢失了锁定文件/home/chris/.opam/4.00.1/lock。

如果您确定没有正在运行的opam进程,只需删除锁定文件即可。特别是你重新启动了机器,因此删除文件是完全安全的。