in reply to cpan: unable to install modules

The root problem is probably this: You try to install as root, but the config file cpan uses is in /Users/me/, probably your home dir. That is definitely not how it should be. Either install everything as user (without sudo, first delete .cpan before you do this) or open a root shell and make sure your home is the home of root (echo $HOME)

In detail your error message might happen if your home dir "/Users/me" is mounted over NFS. In that case root has the rights of user nobody and can't read .cpan if you created that as normal user

Or curl failed to get the files for some reason and the rename won't work on a file that isn't there. But I would hope that cpan gives better error messages for that condition than 'rename failed'

Replies are listed 'Best First'.
Re^2: cpan: unable to install modules
by 7stud (Deacon) on Nov 10, 2009 at 10:57 UTC

    Thanks for the response.

    The root problem is probably this: You try to install as root, but the config file cpan uses is in /Users/me/, probably your home dir. That is definitely not how it should be.

    I would like to setup things the way they should be. When you say "that is not how it should be", are you talking about using the sudo command, or the location of the .cpan directory? Does something need to be moved? Re-installed?

    or open a root shell and make sure your home is the home of root (echo $HOME)

    What is a "root shell"? I have full admin privileges.

Re^2: cpan: unable to install modules
by 7stud (Deacon) on Nov 10, 2009 at 11:29 UTC

    I just wanted to add that, as recommended here:

    http://sial.org/howto/perl/life-with-cpan/macosx/

    at some point I did this:

    cpan> o conf makepl_arg "INSTALLBIN=/usr/local/bin INSTALLSCRIPT=/usr/ +local/bin" cpan> o conf commit

    Is that what's causing the problems?

    At that link it also says:

    The first time CPAN is invoked, it will run through a set of questions, such as which CPAN mirror site to use. Following the questions, CPAN may recommend that you install Bundle::CPAN or Bundle::libnet. Avoid installing these bundles!

    Unfortunately, I did follow the cpan instructions and I installed Bundle::CPAN. I think that shows up in my find results that I posted earlier:

    $ sudo find / -type f -name CPAN.pm /System/Library/Perl/5.8.6/CPAN.pm /Users/me/.cpan/Bundle/CPAN.pm <----HERE*** /Users/me/my_tar_extractions/perl-5.10.1/lib/CPAN.pm /usr/local/lib/perl5/5.10.1/CPAN.pm
      Ah, you are on Mac OS X. In that case my advice floats on thin ice as I don't have much knowledge about that system

      A root shell can be opened with "sudo bash" or "sudo sh"

Re^2: cpan: unable to install modules
by Anonymous Monk on Nov 28, 2009 at 11:57 UTC
    THIS SOLVED MY PROBLEM ... THANK YOU