Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: duplicate perl environments

by frozenwithjoy (Priest)
on Jul 13, 2012 at 16:32 UTC ( [id://981662]=note: print w/replies, xml ) Need Help??


in reply to duplicate perl environments

Perlbrew is awesome for multiple distributions on one machine.

Replies are listed 'Best First'.
Re^2: duplicate perl environments
by Bejjan (Novice) on Jul 13, 2012 at 17:04 UTC
    Hi, thanks for prompt reply.
    I have tried this, and it doesnt help much.
    root@boiao:~# perlbrew list
    * /usr/local/bin/perl (5.10.1)
      /usr/bin/perl (5.12.4)
    
    root@boiao:~# perlbrew switch /usr/bin/perl
    /usr/bin/perl is not installed
    
    root@boiao:~# perlbrew switch 5.12.4
    5.12.4 is not installed
    
    root@boiao:~# perlbrew switch perl-5.12.4
    perl-5.12.4 is not installed
    
    root@boiao:~# perlbrew switch perl_5.12.4
    perl_5.12.4 is not installed
    
    root@boiao:~# perlbrew switch /usr/bin/perl5.12.4 
    /usr/bin/perl5.12.4 is not installed
    
    root@boiao:~# perlbrew switch perl5.12.4 
    perl5.12.4 is not installed
    
    Followed the instructions to init perlbrew and add the path to ~/.bashrc and it lists the two installations and started a new shell, but I'm still not able to switch to 5.12.4

    Br, Jimmy
      root@boiao:~# perlbrew list * /usr/local/bin/perl (5.10.1) /usr/bin/perl (5.12.4)

      Those aren't Perls that perlbrew has control over. I found this confusing the first time I used it. Once you install a Perl with perlbrew and switch to it, you see'll the list change. Something like this:

      * perl-5.12.4 /usr/local/bin/perl (5.10.1) /usr/bin/perl (5.12.4)

      When you do the installation, you're probably going to want a little more than

      perlbrew install perl-5.12.4

      perlbrew (CPAN) documents the general and install-specific options. Also take a look at the two config_args='...' in your perl -V outputs: they differ widely. The perl 5.12.4 INSTALL file may be useful in deciding which -D options to use. You can give each installation its own name with the --as option. So, your actual command might look a bit more like:

      perlbrew install -v perl-5.12.4 -Dusethreads -Duselargefiles --as perl +-5.12.4_custom

      You can now switch to the Perl you've installed. (More on this below.)

      If you didn't choose a custom name, your list will now look like what I showed above. If you did use --as, you'll now see

      * perl-5.12.4_custom /usr/local/bin/perl (5.10.1) /usr/bin/perl (5.12.4)

      I noticed you were trying many variations for the switch statement argument. Given the above, the correct incantations would be:

      perlbrew switch perl-5.12.4 # --as not used perlbrew switch perl-5.12.4_custom # --as used

      You may find this thread useful after installation: perlbrew: moving to a new perl with all current modules

      -- Ken

      With Perlbrew, go ahead and do fresh installs of perl. That way Perlbrew can easily switch between them.
      $ perlbrew available perl-5.17.1 perl-5.16.0 perl-5.14.2 perl-5.12.4 perl-5.10.1 perl-5.8.9 perl-5.6.2 perl5.005_04 perl5.004_05 perl5.003_07 $ perlbrew install perl-5.16.0

      Also, is this a machine that many people use or is it your personal machine? By default, perlbrew installs itself and perl in your home directory, so you don't need to ever use sudo when adding new modules; however, for our shared workhorse, I follow the docs at http://perlbrew.pl to install into /perlbrew so that everyone is able to use the modules I install.

        I would rather get rid of 5.10.1 completly and use 5.12.4 as system default, as this is also used by the webserver processes.
        root@boiao:~# perlbrew switch
        No version in use; defaulting to system
        
        Since the dist-upgrade changed perl configuration, surely there must be some way to force the system defaults ?
        Any advice to this is greatly appreciated.
        Br, Jimmy

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found