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

Every software loves to install perl on my system here is what I found. ( output edited for clarity)

c:\>dir perl.exe /s/p

c:\cygwin\bin\perl.exe

c:\oracle\product\11.2.0\client_1\perl\bin\perl.exe

c:\oracle\product\11.2.0\client_2\perl\bin\perl.exe

c:\Program Files (x86)\Git\bin\perl.exe

c:\Strawberry\perl\bin\perl.exe

Here are the versions c:\>c:\cygwin\bin\perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for cygwin-thread-multi-64int

c:\>c:\oracle\product\11.2.0\client_1\perl\bin\perl -v This is perl, v5.10.0 built for MSWin32-x64-multi-thread

c:\>c:\oracle\product\11.2.0\client_2\perl\bin\perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread

c:\>"c:\Program Files (x86)\Git\bin\perl" -v This is perl, v5.8.8 built for msys

c:\>c:\Strawberry\perl\bin\perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x64-multi-thread

Here is path: c:\>path=C:\Strawberry\perl\bin

c:\>path PATH=C:\Strawberry\perl\bin

c:\>perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x64-multi-thread

Here is error c:\>perl -V Perl lib version (5.12.3) doesn't match executable version (v5.14.2) at c:\Strawberry\perl \lib/Config.pm line 50. Compilation failed in require. BEGIN failed--compilation aborted.

Please help.

Thanks R.

Replies are listed 'Best First'.
Re: Muliple perl installation sucks!
by davido (Cardinal) on Aug 21, 2012 at 19:08 UTC

    On some platforms it's expected that Perl already exists, and this would be called "system Perl", for lack of a better description. Windows doesn't ship with Perl, and there are competing standards when Perl is actually explicitly installed (ActiveState, Strawberry, and others), each of which would install to a different path.

    When a vendor ships an app that requires Perl into an environment where Perl isn't a standard component, he will often ship Perl alongside the app. This is the only way to guarantee that the toolchain is complete, particularly on platforms such as Windows where more often than not the toolchain is incomplete otherwise. This version should be considered a sort of "system perl"; one that shouldn't be tampered with if you want the apps that depend on it to continue to work. Git does this. Oracle does this. cygwin does this.

    Just forget about the git Perl, and the Oracle Perl. For your own work, install one of the explicitly installed versions (ActiveState or Strawberry, for example), set your path accordingly, and get to work.


    Dave

Re: Muliple perl installation sucks!
by syphilis (Archbishop) on Aug 22, 2012 at 00:35 UTC
    Perl lib version (5.12.3) doesn't match executable version (v5.14.2)

    Your Strawberry installation appears to have the wrong C:/Strawberry/perl/lib/Config.pm.
    That one belongs to perl-5.12.3, but you have 5.14.2

    I don't know how that would happen - I guess it's the result of an upgrade from 5.12.3 to 5.14.2 that didn't go as intended.
    You could remove all of the other perls from your box, and you would still have the same problem.

    Cheers,
    Rob

      Hello Rob,

      I did not attempted any failed upgrade of any perl version on my system. But quick look at C:\Strawberry\perl\lib\Config.pm shows me that library version 5.12.3 seems to be hard coded in the code.

      ... few lines omitted *{$callpkg.'::'.$func} = \&{$func}; } *{"$callpkg\::Config"} = \%Config if $export_Config; return; } die "Perl lib version (5.12.3) doesn't match executable version ($])" unless $^V; $^V eq 5.12.3 or die "Perl lib version (5.12.3) doesn't match executable version + (" . sprintf("v%vd",$^V) . ")"; sub FETCH { my($self, $key) = @_; ... rest omitted
        Config.pm is the module that stores the configuration information for your version of Perl. Of course, the hardcoded version number there means that this version of Config.pm is for a Perl of that version, 5.12.3. So, your installation got corrupted and I recommend starting over fresh, or restoring that directory from a known good backup.
Re: Muliple perl installation sucks!
by VinsWorldcom (Prior) on Aug 21, 2012 at 19:13 UTC

    None of the other installations show 5.12.3 as a version. Did you upgrade Strawberry Perl and then not upgrade your modules? Upgrading will *not* overwrite c:\strawberry\perl\site\... installations of modules and any XS modules installed may need to be recompiled.

    What does:

    assoc .pl ftype

    return? Also, look at the registry key:

    HKCR\Applications\perl.exe

    That should have the path of the current Perl executable.

      Thank you guys I am new to perl and trying to load some modules to work with Oracle DB such as DBI/DBD.

      My registry show: C:\strawberry\perl\bin\perl.exe

      I am not aware of what assoc.pl ftype does I was not able to find it. Sorry.

      I just thinking to uninstall all the Perls supplied by vendor and just keep one but scared that it might break something.

      c:\>perl -MCPAN -e shell Perl lib version (5.12.3) doesn't match executable version (v5.14.2) a +t C:\Strawberry\perl \lib/Config.pm line 50. Compilation failed in require at c:/Strawberry/perl/lib/CPAN.pm line 4 +3. BEGIN failed--compilation aborted at c:/Strawberry/perl/lib/CPAN.pm li +ne 43. Compilation failed in require. BEGIN failed--compilation aborted.
Re: Muliple perl installation sucks!
by AnomalousMonk (Archbishop) on Aug 21, 2012 at 19:21 UTC