ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just upgraded my version of perl to 5.18 in an attempt to try and fix this one but it didn't work. Essentially, the following "program"
#!/usr/bin/perl
use v5.14;
fails to run with the error:
Perl v5.14.0 required--this is only v5.12.4, stopped at ./Perl line 2.
BEGIN failed--compilation aborted at ./Perl line 2.
I have tried copy pasting sections of the error string into google and though I get a few hits I have found nothing that can help me with this one...anybody got any ideas?
Either your Perl is lying, or it is really version 5.12.4
Code:
perl -v
which perl
dpkg -l perl
Firstly, thatnks for the response, and secondly, wow...this is wierd, firstly, the new installation seems to have had no effect (configure, make, make install seemed to work), and finally, my output from those commands is as follows:
Code:
greg@greg-Aspire-5742:~$ perl -v
This is perl 5, version 14, subversion 0 (v5.14.0) built for i686-linux
Copyright 1987-2011, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
greg@greg-Aspire-5742:~$ which perl
/home/greg/perl5/perlbrew/perls/perl-5.14.0/bin/perl
greg@greg-Aspire-5742:~$ dpkg -l perl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii perl 5.12.4-4ubuntu Larry Wall's Practical Extraction and Report
greg@greg-Aspire-5742:~$
this can't be healthy :/
Last edited by gregAstley; 08-11-2013 at 03:05 PM.
Just change the path at the top of the perl program OR put a symlink there to point at the 5.14 OR insert the 5.14 path in $PATH before /usr/bin.
I opted for the symlink option (I was tempted to nuke the 5.12, 5.14, and recently (though ineffectually) the install of 5.18 but was worried I might break something in the process)
Usually, locally compiled programs go into /usr/local (./configure --prefix=/usr/local), and script-headers often points there, too:
Code:
#/usr/local/bin/php
...
But, if you don't have locally compiled PHP, you are to create a symlink: ln -s /usr/bin/php /usr/local/bin/php
Thanks, for what its worth, I did have a look at what is inside my /usr/local directory and with the exception of some xml related binaries there is nothing useful in there for me. As per my response to chrism01 above however, all is now well again :]
Certainly, as you've compiled your perl with configure-option --prefix=/home/greg/perl5/perlbrew/perls/perl-5.14.0
That's okay if you are only experimenting; but if you actually want to use it, --prefix=/usr/local is a better idea.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.