[Novalug] Perl CPAN question

Robert Kuropkat robert@kuropkat.com
Fri Oct 10 13:39:55 EDT 2008


*This message was transferred with a trial version of CommuniGate(tm) Pro*

Perl has gotten interesting on modern distros.  You see it somewhat with
PHP also and maybe others.  The "problem" is, the modern distros are
catching up on some of the classic OS installation problems and are now
incorporating other common tools and developer tools into their package
management.  This was not uncommon to see in the Solaris realm quite
awhile ago and now Linux Distros have taken it up.  Bonnie alluded to
this by asking what the equivalent package manager is for your distro

The problem is actually pretty easy to see and not unique to Perl.  Look
at almost ANY Linux application and the directions for a classic, make,
make test, make install method to install the app and then look at what
your favorite distro does instead.  Each distro moves the files around
to suite their particular philosophy.

The problem with things like Perl and PHP as opposed to a self contained
app, is they come with an historical package manager of their own.  If
the distro managers don't take care (which so far they seem to not) they
completely roach the classic package manager.  It sounds like this is
true in your case.

You're options are thus:

1.  Fix the broken up remnants of what your distro did with Perl.  This
is **probably** mostly a matter of fixing various paths in environmental
variables (maybe) and probably editing CPAN.pm to tell it where all your
Perl libraries really ended up.

2.  Remove all remnants of Perl as installed by your distro and
reinstall Perl in the "classic" manner and manage it via CPAN exclusively.

3.  Unless your need is particularly esoteric, check to see if the
module you need is already bundled for your distro.  You may get more
than you need,but you should probably get the proper dependencies, it
will be put in places your distro prefers and your package manager will
be aware of it.  For instance on my FC6 machine, a yum list *perl* will
return 789 perl related packages like so:

-bash-3.1$ yum list *perl* | head
Loading "installonlyn" plugin
Setting up repositories
Reading repository metadata in from local files
Installed Packages
nagios-plugins-perl.i386                 1.4.8-9.fc6
installed
perl.i386                                4:5.8.8-12
installed
perl-Archive-Tar.noarch                  1.30-1.fc6
installed
perl-Compress-Zlib.i386                  1.42-1.fc6
installed
perl-DBI.i386                            1.52-1.fc6
installed
perl-Digest-HMAC.noarch                  1.01-15
installed

...


Robert Kuropkat

P.S.  Since you munged your perl install already, choosing option 3 will
probably mean deleting your current Perl install, then reinstalling it
with whatever additional packages you need.


Megan Larko wrote:
> Okay....it is on a x86_64 linux box using rpm perl-5.8.8-15.
> There is my linux tie-in.
> 
> 
> I am trying to add some new perl modules to my system.   I have not done
> this in a long while.   My first attempt said that the module I wanted
> was available but I needed to update my CPAN via cpan -i Bundle::CPAN
> 
> Well,  that command seemed to work but nothing I have done with cpan
> since has been successful.
> 
> I try to do a standard module install...
> ONE WAY:
> [root@crew01 CPAN]# perl -MCPAN -e 'install File::Copy'
> Can't locate object method "install" via package "File::Copy" at -e line 1.
> 
> VERIFY:
> [root@crew01 CPAN]# which perl
> /usr/bin/perl
> 
> [root@crew01 CPAN]# rpm -qf /usr/bin/perl
> perl-5.8.8-15.el5_2.1
> 
> ANOTHER WAY:
> [root@crew01 CPAN]# cpan -i File::Copy
> CPAN: File::HomeDir loaded ok (v0.81)
> Sorry, we have to rerun the configuration dialog for CPAN.pm due to
> some missing parameters...
> 
> Normally CPAN.pm keeps config variables in memory and changes need to
> be saved in a separate 'o conf commit' command to make them permanent
> between sessions. If you set the 'auto_commit' option to true, changes
> to a config variable are always automatically committed to disk.
> 
>  <auto_commit>
> Always commit changes to config variables to disk? [no]
> 
> The above is a re-gen of my .cpan/MyConfig.pm again... and again...and
> again....    After the MyConfig.pm is regenerated, many screens of text
> later, it says it is successful and to re-try my command.  I do with
> exactly the same results as posted above.   Either no object method
> "install" or it completely regenerates my MyConfig.pm and tells me to
> again try to get the module.   Endless circle.
> 
> I am attaching the text file of MyConfig.pm.
> 
> Any suggestions would be really appreciated.
> 
> megan
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug



More information about the Novalug mailing list