Re: cpan: unable to install modules
by jethro (Monsignor) on Nov 10, 2009 at 10:32 UTC
|
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'
| [reply] |
|
|
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.
| [reply] |
|
|
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
| [reply] [d/l] [select] |
|
|
| [reply] |
|
|
THIS SOLVED MY PROBLEM ... THANK YOU
| [reply] |
Re: cpan: unable to install modules
by Bloodnok (Vicar) on Nov 10, 2009 at 10:32 UTC
|
| [reply] [d/l] [select] |
|
|
$ perldoc LWP
No documentation found for "LWP".
I don't get it. The latest addition of perl doesn't come with the necessary ingredients to use cpan?
| [reply] [d/l] |
|
|
| [reply] [d/l] |
|
|
|
|
|
|
|
|
|
|
LWP isn't required, curl works, wget works...
| [reply] |
|
|
Error while trying to rename '/Users/me/.cpan/sources/authors/01mailrc
+.txt.gz.tmp604' to '/Users/me/.cpan/sources/authors/01mailrc.txt.gz':
+ No such file or directory
That shouts loudly (to me anyway) that the download of /Users/me/.cpan/sources/authors/01mailrc.txt.gz.tmp604 failed ... quietly.
A user level that continues to overstate my experience :-))
| [reply] [d/l] [select] |
|
|
Re: cpan: unable to install modules
by Your Mother (Archbishop) on Nov 12, 2009 at 03:31 UTC
|
This might get you together if you haven't worked it out already (it is *destructive* and assumes you want to only install as root going forward, so only go for it if you're sure). As a plain user, not root-
rm -rf ~/.cpan
That will remove all your current CPAN config etc. You can, of course, edit it with o conf or manually in the generated code but starting from scratch is often good. Then (I think this is good, I'm on OS X but I'm not much of a sysadmin)-
env | grep -i perl
If any ENV settings turn up in there, empty them. E.g., tcsh: setenv PERL5LIB ""; or bash: export PERL5LIB="". There are a few variables that can turn up in there and mess with installs by pointing at the wrong paths and telling CPAN the wrong things are missing or already installed. Then-
sudo cpan
And reinitialize everything. You should be good to go. Just remember to not run the cpan shell as yourself going forward.
| [reply] [d/l] [select] |
Re: cpan: unable to install modules
by Anonymous Monk on Nov 10, 2009 at 23:11 UTC
|
perldoc -l CPAN
or
perl -MCPAN -le"print $INC{'CPAN.pm'}"
Also, try using cpanp instead | [reply] [d/l] [select] |
|
|
$ perldoc -l CPAN
/usr/local/bin/CPAN
$ perl -MCPAN -le"print $INC{'CPAN.pm'}"
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
| [reply] [d/l] |
|
|
See perlrun, you need to quote according to your shell's rules
| [reply] |