5.6 to 5.8 CPAN help

Discussion in 'Perl Misc' started by The King of Pots and Pans, Apr 20, 2004.

  1. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    I had RH7.2 with Perl 5.6 on my machine. I learned a little about CPAN
    a long time ago and remember using it to get modules at one time. I
    haven't used it in a long, long, long while.

    Since then I have upgraded to RH9, which apparently has Perl 5.8. I
    wanted to get the DB_File module the other day and typed "cpan" at my
    linux prompt, not remember how exactly to invoke it or how it works.

    I get the following error:
    [steve@sol 5.8.0]$ cpan
    Can't locate CPAN.pm in @INC (@INC contains:
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .)
    at /usr/bin/cpan line 6.
    BEGIN failed--compilation aborted at /usr/bin/cpan line 6.

    I did a locate on CPAN.pm and got the following:
    [steve@sol steve]$ locate CPAN.pm
    /var/www/html/perlpods/CPAN.pm.html
    /usr/lib/perl5/5.6.0/Bundle/CPAN.pm
    /usr/lib/perl5/5.8.0/CPAN.pm.links
    /usr/local/lib/perl5/5.6.1/CPAN.pm
    [steve@sol steve]$

    I am unsure of how to proceed. I went to the cpan website and tried
    finding information on how to install cpan, or get it working... but
    was unable to find anything to address this issue.

    Anyone have any idea what might be going on and what course of action
    I should take to get cpan working with 5.8?

    I am thinking it probably isn't a good idea just to copy the 5.6 cpan
    module into the 5.8 directory and try to use it?

    - --
    The King of Pots and Pans
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (GNU/Linux)

    iD8DBQFAhMy3d/wbFEGfmloRAiv9AJ9xuSmaN6hJGrpP0mp5vhBf9Mh0dACeI0qn
    wxTWHoJqWaOq6iGku+UBKus=
    =/j4o
    -----END PGP SIGNATURE-----
    The King of Pots and Pans, Apr 20, 2004
    #1
    1. Advertising

  2. In article <KV3hc.65261$U83.27260@fed1read03>,
    The King of Pots and Pans <> wrote:
    :I had RH7.2 with Perl 5.6 on my machine. I learned a little about CPAN
    :a long time ago and remember using it to get modules at one time. I
    :haven't used it in a long, long, long while.

    perl -MCPAN -e shell
    --
    Any sufficiently advanced bug is indistinguishable from a feature.
    -- Rich Kulawiec
    Walter Roberson, Apr 20, 2004
    #2
    1. Advertising

  3. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On Tue, 20 Apr 2004 at 07:14 GMT, Walter Roberson spoke:
    > In article <KV3hc.65261$U83.27260@fed1read03>,
    > The King of Pots and Pans <> wrote:


    >:I had RH7.2 with Perl 5.6 on my machine. I learned a little about
    >CPAN :a long time ago and remember using it to get modules at one
    >time. I :haven't used it in a long, long, long while.


    > perl -MCPAN -e shell


    Thanks. As user 'steve' that at least did something. I went through
    the setup and finally typed "install Net::FTP" and "install
    Bundle::CPAN" as it suggested. During the process I got a bunch of
    errors about "you do not have permissions to install this" and a lot
    of "not found in @INC path" type stuff.

    I tried su'ing to root and running the command above you
    suggested. But got the original bad @INC path thing:

    [root@sol root]# perl -MCPAN -e shell
    Can't locate CPAN.pm in @INC (@INC contains:
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .).
    BEGIN failed--compilation aborted.
    [root@sol root]#

    Also, in what documentation does one find that "perl -MCPAN -e shell"
    kicks off everything? I looked and looked and looked but couldn't find
    how to "start it."

    - --
    The King of Pots and Pans
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (GNU/Linux)

    iD8DBQFAhNUxd/wbFEGfmloRAt84AJ0ZFK953Txd0QoKhyJAHtk7igMGjwCgsi9M
    XDjPLzcHleGw/E/um+AVH6A=
    =9+I9
    -----END PGP SIGNATURE-----
    The King of Pots and Pans, Apr 20, 2004
    #3
  4. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On Tue, 20 Apr 2004 at 07:14 GMT, Walter Roberson spoke:

    > perl -MCPAN -e shell


    When I attempt to install things using the above it installs them in
    the perl 5.6 dirs. How do I start using the perl 5.8 and configure
    cpan for perl 5.8?

    My whole point here is to use cpan to get DB_File because spamassassin
    won't let me use the sa-learn program until DB_File module is
    installed. I believe I was able to install DB_File using CPAN just
    fine, but sa-learn -D still believes it is not installed.

    ??


    - --
    The King of Pots and Pans
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (GNU/Linux)

    iD8DBQFAhNiwd/wbFEGfmloRArkEAJ9c0BWGDf7GidvCiU7FbgNiwNXA9QCfeO4g
    xouS2fovtfL6GGhJDaRb0/I=
    =GNcU
    -----END PGP SIGNATURE-----
    The King of Pots and Pans, Apr 20, 2004
    #4
  5. In article <DF4hc.65268$U83.9863@fed1read03>,
    The King of Pots and Pans <> wrote:
    :On Tue, 20 Apr 2004 at 07:14 GMT, Walter Roberson spoke:

    :> perl -MCPAN -e shell

    :When I attempt to install things using the above it installs them in
    :the perl 5.6 dirs. How do I start using the perl 5.8 and configure
    :cpan for perl 5.8?

    perl5.8 -MCPAN -e shell

    CPAN knows about which version of perl you are running, and will
    install under the appropriate hierarchy.
    --
    Contents: 100% recycled post-consumer statements.
    Walter Roberson, Apr 20, 2004
    #5
  6. In article <Fr4hc.65265$U83.53371@fed1read03>,
    The King of Pots and Pans <> wrote:
    :I tried su'ing to root and running the command above you
    :suggested. But got the original bad @INC path thing:

    :[root@sol root]# perl -MCPAN -e shell
    :Can't locate CPAN.pm in @INC (@INC contains:
    :/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    :/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
    :/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
    :/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    :/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
    :/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .).

    Notice the . just before the closing bracket. That dot indicates
    the current directory will be examined. So just CD to a directory
    that has CPAN.pm in it, and try again. (You might have to then
    tell CPAN to install CPAN so it gets stuffed in the expected location...)

    As for how to know that this was the way to invoke CPAN:

    $ perldoc -m CPAN
    [.... lots and lots of code to scroll through]
    =head1 NAME

    CPAN - query, download and build perl modules from CPAN sites

    =head1 SYNOPSIS

    Interactive mode:

    perl -MCPAN -e shell;


    --
    Cannot open .signature: Permission denied
    Walter Roberson, Apr 20, 2004
    #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:
    382
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    199
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    281
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    937
    SVCitian
    Oct 22, 2010
  5. PerlFAQ Server
    Replies:
    0
    Views:
    167
    PerlFAQ Server
    Jan 24, 2011
Loading...

Share This Page