Removing .cpan Directory
am 03.11.2007 03:54:17 von mmccaws2
What happens if one remove .cpan directory in the home directory. I'm
locked out of the perl shell, reinstalled perl, and still can't
perl -e shell
This symptom seems to have isolated the problem to my configuration.
Mike
Re: Removing .cpan Directory
am 03.11.2007 05:30:14 von Ron Bergin
On Nov 2, 7:54 pm, mmccaws2 wrote:
> What happens if one remove .cpan directory in the home directory. I'm
> locked out of the perl shell, reinstalled perl, and still can't
> perl -e shell
>
> This symptom seems to have isolated the problem to my configuration.
>
> Mike
Do you mean the cpan shell?
try
perl -MCPAN -e shell
Re: Removing .cpan Directory
am 03.11.2007 07:23:13 von mmccaws2
On Nov 2, 9:30 pm, Ron Bergin wrote:
> On Nov 2, 7:54 pm, mmccaws2 wrote:
>
> > What happens if one remove .cpan directory in the home directory. I'm
> > locked out of the perl shell, reinstalled perl, and still can't
> > perl -e shell
>
> > This symptom seems to have isolated the problem to my configuration.
>
> > Mike
>
> Do you mean the cpan shell?w
>
> try
>
> perl -MCPAN
When I try that command and similar ones, I'm rejected. So I thought
perl was corrupted. But after reinstalling perl, I still can't log
into the shell. Error messages reflect a module install error output
that I was doing when my connection got disrupted.
So if you reinstall perl and the only thing that stay the same, I
believe, is that .cpan directory in my home directory. You know /home/
username/.cpan. So I'm thinking about either blowing away my .cpan
directory and see if that makes a difference.
Does anyone know what should happen?
Mike
Re: Removing .cpan Directory
am 03.11.2007 14:10:43 von Sherm Pendley
mmccaws2 writes:
> So if you reinstall perl and the only thing that stay the same, I
> believe, is that .cpan directory in my home directory. You know /home/
> username/.cpan. So I'm thinking about either blowing away my .cpan
> directory and see if that makes a difference.
>
> Does anyone know what should happen?
That depends. If you normally run CPAN as root, then it stores its config
info (mirror locations, etc) in the global CPAN/Config.pm module, and the
only thing in .cpan will be downloaded tarballs, build trees, and so forth;
in other words, nothing critical.
If you don't run CPAN as root, then the config params are stored in .cpan/
CPAN/MyConfig.pm instead. This could be the case if you use CPAN to install
modules in your home directory, or if you're using a newer CPAN.pm that lets
you limit root authority to just the final "sudo make install".
If you want to "reset" CPAN, and if it's using a global CPAN::Config.pm,
then it might not be a bad idea to delete that too. CPAN::MyConfig.pm, of
course, lives under .cpan, so deleting the directory will catch it too.
After that, CPAN should prompt you to go through the initial configuration
steps again, setting up the default Makefile.PL arguments, choosing mirrors,
etc. And because you've deleted the cached info, it will fetch fresh copies
of its module and author indexes.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: Removing .cpan Directory
am 03.11.2007 15:20:56 von mmccaws2
On Nov 3, 6:10 am, Sherman Pendley wrote:
> mmccaws2 writes:
> > So if you reinstall perl and the only thing that stay the same, I
> > believe, is that .cpan directory in my home directory. You know /home/
> > username/.cpan. So I'm thinking about either blowing away my .cpan
> > directory and see if that makes a difference.
>
> > Does anyone know what should happen?
>
> That depends. If you normally run CPAN as root, then it stores its config
> info (mirror locations, etc) in the global CPAN/Config.pm module, and the
> only thing in .cpan will be downloaded tarballs, build trees, and so forth;
> in other words, nothing critical.
>
> If you don't run CPAN as root, then the config params are stored in .cpan/
> CPAN/MyConfig.pm instead. This could be the case if you use CPAN to install
> modules in your home directory, or if you're using a newer CPAN.pm that lets
> you limit root authority to just the final "sudo make install".
>
> If you want to "reset" CPAN, and if it's using a global CPAN::Config.pm,
> then it might not be a bad idea to delete that too. CPAN::MyConfig.pm, of
> course, lives under .cpan, so deleting the directory will catch it too.
>
> After that, CPAN should prompt you to go through the initial configuration
> steps again, setting up the default Makefile.PL arguments, choosing mirrors,
> etc. And because you've deleted the cached info, it will fetch fresh copies
> of its module and author indexes.
>
> sherm--
>
> --
> Web Hosting by West Virginians, for West Virginians:http://wv-www.net
> Cocoa programming in Perl:http://camelbones.sourceforge.net
There was a CPAN.pm file. I removed that. Now I see
mkdir /home/mcca/.cpan/CPAN: Permission denied at /opt/perl_32/lib/
5.8.8/CPAN/HandleConfig.pm line 529
It looks like there is some setting to make sure non sudo users can't
use perl -MCPAN -e shell
Which means that my co developers will not be able to use, I could be
wrong. How do I change that?
Also
I just installed the latest CPAN.pm, the last line says
'YAML' not installed, will not store persistent state.
what is this doing?
Mike
Mike
Re: Removing .cpan Directory
am 03.11.2007 16:30:37 von mmccaws2
On Nov 3, 7:20 am, mmccaws2 wrote:
> On Nov 3, 6:10 am, Sherman Pendley wrote:
>
>
>
> > mmccaws2 writes:
> > > So if you reinstall perl and the only thing that stay the same, I
> > > believe, is that .cpan directory in my home directory. You know /home/
> > > username/.cpan. So I'm thinking about either blowing away my .cpan
> > > directory and see if that makes a difference.
>
> > > Does anyone know what should happen?
>
> > That depends. If you normally run CPAN as root, then it stores its config
> > info (mirror locations, etc) in the global CPAN/Config.pm module, and the
> > only thing in .cpan will be downloaded tarballs, build trees, and so forth;
> > in other words, nothing critical.
>
> > If you don't run CPAN as root, then the config params are stored in .cpan/
> > CPAN/MyConfig.pm instead. This could be the case if you use CPAN to install
> > modules in your home directory, or if you're using a newer CPAN.pm that lets
> > you limit root authority to just the final "sudo make install".
>
> > If you want to "reset" CPAN, and if it's using a global CPAN::Config.pm,
> > then it might not be a bad idea to delete that too. CPAN::MyConfig.pm, of
> > course, lives under .cpan, so deleting the directory will catch it too.
>
> > After that, CPAN should prompt you to go through the initial configuration
> > steps again, setting up the default Makefile.PL arguments, choosing mirrors,
> > etc. And because you've deleted the cached info, it will fetch fresh copies
> > of its module and author indexes.
>
> > sherm--
>
> > --
> > Web Hosting by West Virginians, for West Virginians:http://wv-www.net
> > Cocoa programming in Perl:http://camelbones.sourceforge.net
>
> There was a CPAN.pm file. I removed that. Now I see
>
> mkdir /home/mcca/.cpan/CPAN: Permission denied at /opt/perl_32/lib/
> 5.8.8/CPAN/HandleConfig.pm line 529
>
> It looks like there is some setting to make sure non sudo users can't
> use perl -MCPAN -e shell
>
> Which means that my co developers will not be able to use, I could be
> wrong. How do I change that?
>
> Also
>
> I just installed the latest CPAN.pm, the last line says
>
> 'YAML' not installed, will not store persistent state.
>
> what is this doing?
>
> Mike
>
> Mike
Lessons learned:
if you can't get into a perl shell from perl -MCPAN it may be from
the .cpan/CPAN.pm file. So you may not need to reinstall perl
The question I have is -- what commands are there to test a perl
configuration as appose to test a perl -MCPAN -e shell problem?
Anyone have a link to address this?
Well thanks everyone.
Mike
Re: Removing .cpan Directory
am 03.11.2007 23:28:09 von Sherm Pendley
mmccaws2 writes:
> It looks like there is some setting to make sure non sudo users can't
> use perl -MCPAN -e shell
There is no such thing. You need root privileges if you're installing
modules in a directory for which such privs are needed - but that has
nothing at all to do with CPAN.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Re: Removing .cpan Directory
am 04.11.2007 18:10:50 von mmccaws2
On Nov 3, 2:28 pm, Sherman Pendley wrote:
> mmccaws2 writes:
> > It looks like there is some setting to make sure non sudo users can't
> > use perl -MCPAN -e shell
>
> There is no such thing. You need root privileges if you're installing
> modules in a directory for which such privs are needed - but that has
> nothing at all to do with CPAN.
>
> sherm--
>
> --
> Web Hosting by West Virginians, for West Virginians:http://wv-www.net
> Cocoa programming in Perl:http://camelbones.sourceforge.net
Thanks
I realize i keep calling it a shell, only since it gives you a 'shell'
like prompt (>). So I'm obviously calling it a shell is incorrect.
Once perl was rebuilt, this is hpux so I think what was actually done
was the latest Perl binary version for that OS version was installed,
my .cpan directory was unchanged, as you would expect. So I still got
error messages using $perl -MCPAN -e shell similar to those posted
before and then bumped out to the normal Posix shell. Now since my
cpan configuration hadn't changed and my perl installation did, the
next thing that I could figure was it had something to do with my
configuration. So, I ask the community, then blew away my cpan.pm.
I've reinstalled the modules I needed and I'm back enjoying putting
together my programs.
I realize that now I have a new perl installation I can't go back to
analyze what went wrong. Can you suggest how cpan.pm could lock up my
access to perl -MCPAN -e shell? Should I be looking for other
problems developing??
let me know.
Mike
Re: Removing .cpan Directory
am 06.11.2007 13:34:54 von Joe Smith
mmccaws2 wrote:
> mkdir /home/mcca/.cpan/CPAN: Permission denied at /opt/perl_32/lib/
> 5.8.8/CPAN/HandleConfig.pm line 529
>
> It looks like there is some setting to make sure non sudo users can't
> use perl -MCPAN -e shell
Probably just simple file and directory permissions.
First step: Make sure all directories that CPAN wants to write to
are in fact writable by the non-root user who is running it.
# find /home/mcca -user root -print | xargs chown mcca
or
# chown -R mcca /home/mcca/.cpan
-Joe