Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

A problem with two perls on a Debian system

by rinceWind (Monsignor)
on Mar 12, 2006 at 10:41 UTC ( [id://536064]=perlquestion: print w/replies, xml ) Need Help??

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

I have an instance where I have needed to build my own perl. The existing perl installed by apt-get (sarge) resides in /usr/bin, and is 5.8.4. The perl I have built is 5.8.7, and I took the defaults and installed this to /usr/local/bin (libraries to /usr/local/lib/perl5 etc.)

My new perl comes first in the path, and that is the one that I want to use for everything. CPAN installs work fine, as do CPANPLUS. My problem is that I have installed some more distributions with apt-get, which have perl bindings. These have gone into /usr/lib/ and are only visible from 5.8.4.

I know I can repoint PERL5LIB to add the lib paths, but I am looking for a more permanent solution.

Should I rebuild my perl with different config options, to give me an @INC with the other lib directories included?

Should I install my perl over the top of the one in /usr/bin and /usr/lib? (this seems more risky to me)

What's the best way of dealing with this?

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

  • Comment on A problem with two perls on a Debian system

Replies are listed 'Best First'.
Re: A problem with two perls on a Debian system
by polettix (Vicar) on Mar 12, 2006 at 12:10 UTC
    I have pretty the same situation: debian sarge, and no will to use perl 5.8.4. I ended up in installing perl 5.8.8 into /opt/perl, and using only CPAN to install new modules in the new perl system (as a matter of fact, I keep the old perl only for scripts that may actually need it, in particular those in the debian system).

    Even if there should be binary compatibility between the two versions of perl, I'd refrain from using modules from the 5.8.4. What if you need more updated modules? I've simply installed the modules again in the new tree and let them live their lives.

    In a previous installation (using Slackware) I recompiled perl as well, jumping from 5.8.0 to 5.8.4. In that occasion, I played a dirt trick and made /usr/local/lib/perl5/site_lib/5.8.4 point to /usr/lib/perl5/site_lib/5.8.0 without having problems, due to binary compatibility. But I think that was a quite different situation: I have never truly used Slackware package system, so I knew I wasn't going to spoil anything installing new modules in the old perl tree.

    Hope this helps,

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.
Re: A problem with two perls on a Debian system
by idsfa (Vicar) on Mar 12, 2006 at 20:49 UTC

    Don't overwrite the Debian perl.

    Every time I have had problems with updating a Debian box, it has been because the perl package got borked. Perl is deeply involved in holding apt together, and there is little nastier than trying to repair a half-done apt-get upgrade.

    Once you go your own way (build an unpackaged perl), you should stay there. Use CPAN to add functionality to your own perl and apt-get for the Debian one.

    Oh, and I don't recommend using update-alternatives for perl (pre-emptive advice). The alternatives system is also written in perl ... the circular dependencies can crush you.


    The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon
Re: A problem with two perls on a Debian system
by ioannis (Abbot) on Mar 12, 2006 at 11:04 UTC
    Anothe option is to just rename your custom-build perl binary to a different name: perl-8.7 .

      That doesn't help, as it's the 5.8.7 that I want to use with the freshly installed libs.

      --

      Oh Lord, won’t you burn me a Knoppix CD ?
      My friends all rate Windows, I must disagree.
      Your powers of persuasion will set them all free,
      So oh Lord, won’t you burn me a Knoppix CD ?
      (Missquoting Janis Joplin)

        Why t would not help? Every perl binary knows its own configuration.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://536064]
Approved by wfsp
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2024-04-25 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found