#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    307
    Rep Power
    0

    Opensuse 12.2 how can i check if i do run one or two versions of Perl?!


    -gentlemen,

    i run opensuse 12.2

    note - i have serous troubles with some modules. Well

    i think that can be caused of some messi perl-installation:

    opensuse 12.2 how can i check if i do run one or two versions of Perl?!

    can i check this via yast or commandline!?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    830
    Rep Power
    496
    Code:
    perl -v
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    307
    Rep Power
    0
    hi there - hello and many thanks


    Originally Posted by Laurent_R
    Code:
    perl -v
    PHP Code:

    linux
    -wyee:/home/martin #  perl -v

    This is perl 5version 16subversion 0 (v5.16.0built for i586-linux-thread-multi

    Copyright 1987
    -2012Larry Wall

    Perl may be copied only under the terms of either the Artistic License 
    or the
    GNU General 
    Public Licensewhich may be found in the Perl 5 source kit.

    Complete doceumentation for Perlincluding FAQ listsshould 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.

    linux-wyee:/home/martin 
    note - i ALSO installed perlbrew - but i allways get the same errors.
    Note; well - were sure that Perl installed, but were also sure that it cannot be easily checked since perl itself could be installed anywhere on the machine.
    (and in many possible ways).

    well i think i need a new installation from scratch... what do you say!?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    830
    Rep Power
    496
    Even if you have two versions installed, your machine will find only one, won't it?
  8. #5
  9. 'fie' on me, allege-dly
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,889
    Rep Power
    6444
    The machine can find as many are on the box, depends on the user's paths, so your user and say, the webserver user could be configured to find different installations

    That's a guess, ... YMMV

    Write a script to execute 'perl -V' and run it under your user and the webserver user and pay attention to the paths at the end of the output.

    Note: V not v

    Comments on this post

    • keath agrees
    --Ax
    without exception, there is no rule ...
    Handmade Irish Jewellery
    Targeted Advertising Cookie Optout (TACO) extension for Firefox
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


    09 F9 11 02
    9D 74 E3 5B
    D8 41 56 C5
    63 56 88 C0
    Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
    -- Jamie Zawinski
    Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
    BIT COINS ANYONE
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,930
    Rep Power
    1225
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    38
    Rep Power
    2
    Originally Posted by metabo
    -gentlemen,

    i run opensuse 12.2

    note - i have serous troubles with some modules. Well

    i think that can be caused of some messi perl-installation:

    opensuse 12.2 how can i check if i do run one or two versions of Perl?!

    can i check this via yast or commandline!?
    Sometimes it is normal for you to have two perl. For example I have the perl that comes with the OS and other perl from a package like XAMPP. Now, if you do
    Code:
    perl -v
    It will show you the version of the perl that it finds first in the PATH environment variables. For example if you do
    Code:
    env
    or
    Code:
    printenv
    you will the the $PATH variable, meaning that all comands will look for the paths listed on $PATH to find that comand. So, the perl -v will show the first one that appears in the $PATH. But, an easy way to find if you have another perl installed, you can just find
    Code:
    find / -name perl
    Using that code will do a search of all perl executables and their locations. Now you can check if you have two versions of perl by doing
    Code:
    /.../some/directory/bin/perl -v
    and compare it to
    Code:
    perl -v
    Hope I have been clear
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    307
    Rep Power
    0
    many many thanks for the input and the help - just
    a quick test runnded twice

    as user martin and
    as root

    see the results


    PHP Code:

    martin
    @linux-wyee:~> whereis perl
    perl
    : /usr/bin/perl /usr/bin/X11/perl /usr/share/man/man1/perl.1.gz

    martin
    @linux-wyee:~> su
    Passwort

    linux-wyee:/home/martin # whereis perl
    perl: /usr/bin/perl /usr/bin/X11/perl /usr/share/man/man1/perl.1.gz
    linux
    -wyee:/home/martin 


    surprisingliy - no double perl on the machine or what!?!
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,930
    Rep Power
    1225
    /usr/bin/perl
    /usr/bin/X11/perl

    That looks to me like you probably have 2 different installations.

    Can you run a simple "Hello World" script when specifying each of those paths?
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    830
    Rep Power
    496
    Or try:

    Code:
    /usr/bin/perl -v
    and

    Code:
    /usr/bin/X11/perl -v

IMN logo majestic logo threadwatch logo seochat tools logo