http://qs1969.pair.com?node_id=780674

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

My PERL in FEDORA 10 seems to be screwed up.I cannot invoke CPAN from the shell.This seems to be difficult for me since every module which I want needs to manually loaded and it is not reaching anywhere.So I thought of cleaning the perl by removing once for all and installing the rpm. I like to know is there an easy way to do this and if so, can anybody gives the steps. any help is appreciated.
  • Comment on Is there an easy way to clean PERL in Fedora 10 and reinstall PERL

Replies are listed 'Best First'.
Re: Is there an easy way to clean PERL in Fedora 10 and reinstall PERL
by davorg (Chancellor) on Jul 16, 2009 at 12:15 UTC

    What do you mean by "I cannot invoke CPAN from the shell"? What unexpected behaviour do you see?

    I don't recommend mixing RPM-installed modules with CPAN-installed modules in the same Perl installation. It's bound to lead to problems eventually (there's a chance it even led to whatever problems you're currently having).

    The system Perl that comes with Fedora already has a number of RPM-installed modules with it. I therefore strongly recommend only installing new modules using RPM or yum. I know that not all CPAN modules are available that way but you have a couple of options. You can find new repositories that have other CPAN modules available (I run one such repository - and I take requests for new modules) or you can learn how to create your own RPMs from CPAN modules - it's really not that hard.

    See my presentation Perl in RPM-Land for more details.

    --

    See the Copyright notice on my home node.

    Perl training courses

Re: Is there an easy way to clean PERL in Fedora 10 and reinstall PERL
by jettero (Monsignor) on Jul 16, 2009 at 12:07 UTC

    It's Perl. PERL is a shibboleth.

    But on topic: What happens when it doesn't work? How do you know it failed? What was the error message?

    Most likely, you can just install the rpm over-top and it'll work fine. If you really want, you can remove the perl lib dirs. Where those are located depends on your install, but it's probably something like this: /usr/lib/perl /usr/share/perl /usr/local/lib/perl and /usr/local/share/perl... hard to say.

    Try: perl -e 'print "@INC\n"' to get a list of these locations.

    -Paul

      I get this error as follows: #cpan Undefined subroutine &CPAN::shell called at /usr/bin/cpan line 198. Initially CPAN was not installed, so I Installed the rpm by 'make install". Then CPAN was installed. But now, this is what is happening.I did not use yum for the CPAN install since it does not work. Any help ??? I tried to reinstall the rpm from the CD.But it failed saying there is no transactions.I believe it recognizes that PERL is installed and doe not try to reinstall.
        so I Installed the rpm by 'make install"

        Please slow down and pay attention to what you're telling us. You don't install RPMs with "make install". You install RPMs with "yum". So what did you really do?

        I did not use yum for the CPAN install since it does not work.

        What do you mean by "it does not work"? What unexpected behaviour did you see? Were there any error messages?

        yum works fine for installing modules in Fedora. If you have a problem I'm sure it can be resolved.

        I tried to reinstall the rpm from the CD.But it failed saying there is no transactions.

        Please tell us exactly what the error message said. Copy and paste it. Don't just paraphrase. That helps no-one.

        I believe it recognizes that PERL is installed and doe not try to reinstall.

        Yes, rpm (and, therefore, yum) won't reinstall RPMs that are already installed unless you use the --force option. But I don't believe that you need to reinstall Perl in order to resolve these problems.

        If you clearly explain what you are doing and what error messages you are getting, then I'm confident that we can help you. If you just post vague or incorrect information then we might try a few guesses, but we're likely to get bored quickly :-)

        --

        See the Copyright notice on my home node.

        Perl training courses

Re: Is there an easy way to clean PERL in Fedora 10 and reinstall PERL
by skirnir (Monk) on Jul 16, 2009 at 12:13 UTC
    First of all, please check whether the package

    perl-CPAN

    is installed on your machine. If it isn't, please install it and try again.

Re: Is there an easy way to clean PERL in Fedora 10 and reinstall PERL
by Khen1950fx (Canon) on Jul 16, 2009 at 20:49 UTC
    I've been using Fedora since Fedora Core 1, and I'll have to admit that it's confusing at first. I guess the best way to look at it is that the vendor-supplied perl works with the vendor programs that require Perl, but, in general, cpan looks looks for the "site" Perl. Here's a recent article that'll help:

    Install locations for CPAN