Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

CPAN error: There seems to be running another CPAN process

by cormanaz (Deacon)
on Jun 26, 2007 at 18:58 UTC ( [id://623469]=perlquestion: print w/replies, xml ) Need Help??

cormanaz has asked for the wisdom of the Perl Monks concerning the following question:

Howdy Bros. I went to install a CPAN module on my linux (FC6) system and got an error:
There seems to be running another CPAN process (pid 12651). Contactin +g... Other job not responding. Shall I overwrite lockfile '/root/.cpan/.lo +ck'? (y/n)
I have researched this a little and it seems that bad things like core dumps happen when you answer yes to this question. There is no clear direction on what to do to fix this problem other then reinstalling Perl or ../perl/site/lib. Re-installing is a last resort that would create a lot of work for me and I would dearly love to fix this problem without doing so.

I found this post which says I could try to "hunt down and kill" the CPAN lock file. But I don't want to try anything like that until I'm sure it's not going to hose the whole Perl setup or something. Is this a risky thing to try? Anyone know of another fix?

Thanks...Steve

Replies are listed 'Best First'.
Re: CPAN error: There seems to be running another CPAN process
by ferreira (Chaplain) on Jun 26, 2007 at 19:23 UTC

    I don't think your fears are justified: I saw it happen a lot. It may happen when you kill the cpan script abruptly ("kill -9") or even shutdown the machine without leaving the shell. The lock file remains there and you may overwrite it without consequences.

    It there is really another CPAN process alive, you may look for it in the process list and resume it from there. No horrendous thing comes from overwriting the lockfile. If something gets corrupt, it's only at CPAN local directory (which you find via "o conf cpan_home" and may clean up from bad files at your wish).

    As a side note, the latest CPAN (1.902) is even better and offers a degraded mode to let you in without overwriting the lockfile.

Re: CPAN error: There seems to be running another CPAN process
by Joost (Canon) on Jun 26, 2007 at 19:29 UTC
    The most likely cause of this problem is when some other CPAN process terminated in some unexpected way and didn't remove the lock file. Probably that was a one-time event. If so, there's no need to re-install perl, or CPAN.

    Note that the lock file is just there to make sure you don't run two CPAN installer processes at the same time. If the lock is still there but there is no other CPAN process running it should be safe to remove it.

    Try ps -eaf|grep 12651 to see if there is a CPAN process with that process id running. If there isn't, just answer Yes to the question (or remove the .lock file yourself before restarting CPAN).

Re: CPAN error: There seems to be running another CPAN process
by clinton (Priest) on Jun 26, 2007 at 19:26 UTC
    Typically, what has happened is that you have started cpan, and then used ^Z to put it to sleep, or changed to a different terminal. Then you try to start it again. It checks for a lock file, finds one, and complains.

    It is not a serious issue. Unless you happen to be running a lengthy install in the other CPAN process, there shouldn't be any conflicts.

    I've never had a problem overwriting the lock file.

    Clint

Re: CPAN error: There seems to be running another CPAN process
by naikonta (Curate) on Jun 27, 2007 at 02:32 UTC
    Whenever I encounter this, I just type "y", then Enter, and move along. I never faced the situation that it resulted core dump or something. The fact that Other job not responding is a strong indication that the lock file is staled. No magic, no harm, life is good, and CPAN is cool. Well, Perl is great :-)

    But if this was multiuser host, and I wasn't the only one who had the root privileges, I would first check with the other person to make sure. I myself, don't run cpan with root account. And I'm a single person who uses my laptop, but that doesn't mean I use single account :-)


    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://623469]
Approved by ferreira
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found