Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Perl version

by perlmonk007 (Novice)
on Mar 08, 2013 at 02:44 UTC ( #1022334=perlquestion: print w/ replies, xml ) Need Help??
perlmonk007 has asked for the wisdom of the Perl Monks concerning the following question:

hi guys, i have a simple question, I use ubuntu 11.04, which i installed using wubi, it has perl version 5.10 installed and i tried to update it using command line and using the make files as well nothing worked, it got installed once and I even put it in my root directory

however, I got a compile error so i quit the command line and restarted it again, now i need to use perl version 5.016, i think i have it installed already but the perl scripts are using 5.10 please if someone knows how to go about this it would help a great deal, i tried use 5.016 in scripts as well but it gives the following error

Perl v5.16.0 required--this is only v5.10.1, stopped at exp2.pl line 4.

also when i install perl 5.16.2 and run the program I get the following error

Can't locate Error.pm in @INC (@INC contains: /home/strider/localperl/lib/site_perl/5.16.2/x86_64-linux /home/strider/localperl/lib/site_perl/5.16.2 /home/strider/localperl/lib/5.16.2/x86_64-linux /home/strider/localperl/lib/5.16.2 .) at /home/strider/localperl/lib/site_perl/5.16.2/ParsePDB.pm line 45. BEGIN failed--compilation aborted at /home/strider/localperl/lib/site_perl/5.16.2/ParsePDB.pm line 45. Compilation failed in require at exp2.pl line 6. BEGIN failed--compilation aborted at exp2.pl line 6.

Comment on Perl version
Re: Perl version (do not update system perl, install local perl)
by Anonymous Monk on Mar 08, 2013 at 02:59 UTC

    and i tried to update it

    don't do that, ever

    use apt-get or whatever, if it still works, to reinstall system/vendor perl

    Then if you want 5.16, install it in your home directory or /opt/perl, use sh Configure -Dprefix=/opt/perl

    perlbrew can help you maintain perl-s in your home directory (or /opt/perl )

    see http://search.cpan.org/dist/perl-5.16.2/INSTALL Config#installstyle

    To use your new perl you'll have to change your $PATH and/or shebang accordingly, ie #!/usr/bin/env perl or #!/opt/perl/bin/perl --

Re: Perl version
by sundialsvc4 (Abbot) on Mar 08, 2013 at 03:47 UTC

    Many OS installations have a substantial amount of software that’s written in a particular version of Perl, and that depends on it.   You can certainly install a different version “from source,” and that is exactly what you should do.   As though you were, say, on a shared-hosting system that had not yet caught up with the times.   Your “local” environment would be installed in some location, such as (say...) /usr/local/bin, which occurred earlier on your $PATH, and you would also arrange for locally-defined values for $PERL5LIB and so on.

      "It doesn't, and you can't, I won't, and it don't it hasn't, it isn't, it even ain't, and it shouldn't it couldn't" He told him, "No, no, no" I told him, "Yes, yes, yes" I said, "I do it all the time Ain't this boogie a mess"? (FZ)

      I could not do otherwise.

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

Re: Perl version
by karlgoethebier (Curate) on Mar 08, 2013 at 07:29 UTC

    Use perlbrew. Best way. It builds perl from source, takes care of your environment, lets you switch between different versions of perl a.s.o

    Update: And don't forget to take a look at Perlbrew and Friends.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-09-20 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (157 votes), past polls