Removing .cpan Directory

Discussion in 'Perl Misc' started by mmccaws2, Nov 3, 2007.

  1. mmccaws2

    mmccaws2 Guest

    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
     
    mmccaws2, Nov 3, 2007
    #1
    1. Advertising

  2. mmccaws2

    Ron Bergin Guest

    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
     
    Ron Bergin, Nov 3, 2007
    #2
    1. Advertising

  3. mmccaws2

    mmccaws2 Guest

    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
     
    mmccaws2, Nov 3, 2007
    #3
  4. mmccaws2

    mmccaws2 Guest

    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
     
    mmccaws2, Nov 3, 2007
    #4
  5. mmccaws2

    mmccaws2 Guest

    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
     
    mmccaws2, Nov 3, 2007
    #5
  6. mmccaws2

    mmccaws2 Guest

    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
     
    mmccaws2, Nov 4, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carl d.
    Replies:
    1
    Views:
    417
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    227
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    309
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    1,007
    SVCitian
    Oct 22, 2010
  5. PerlFAQ Server
    Replies:
    0
    Views:
    184
    PerlFAQ Server
    Jan 24, 2011
Loading...

Share This Page