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

git svn init svn://mymachine/Trunk/mytrunk/ --no-metadata

I am trying to use this command on Windows in order to migrate a subversion repo. I never had to deal with Perl until now, but suddenly I am getting perl-related errors:

C:\Program Files\Git\mingw64/libexec/git-core\git-svn: Perl lib versio +n (5.26.2) doesn't match executable 'perl' version (5.26.1) at /usr/l +ib/perl5/core_perl/Config.pm line 62. Compilation failed in require at /usr/lib/perl5/core_perl/lib.pm line +6. BEGIN failed--compilation aborted at /usr/lib/perl5/core_perl/lib.pm l +ine 6. Compilation failed in require at C:\Program Files\Git\mingw64/libexec/ +git-core\git-svn line 37. BEGIN failed--compilation aborted at C:\Program Files\Git\mingw64/libe +xec/git-core\git-svn line 37.

After this, I tried to upgrade my perl so I downloaded ActiveState, but nothing changed. It looks like the shell is using the system perl, which I don't even know where it's installed. How do I fix this conflict on windows ?

Replies are listed 'Best First'.
Re: Perl conflict when trying to use git svn
by Corion (Patriarch) on Jun 18, 2020 at 16:30 UTC

    git on Windows comes with its own Perl installation.

    Depending on how you installed git, the installer put the git perl in the path before the ActiveState Perl. Inspect your environment:

    echo %PATH%

    If you don't want ActiveState Perl to interfere with the git Perl, remove ActiveState Perl from the path when you run git. Changing the PATH environment variable works for all console windows separately, so in one console window, you can move git to the front of the path:

    echo %PATH% path C:\Programs\Git\bin;C:\Programs\Git\cmd;%PATH%

    ... or alternatively, remove the path entries referencing ActiveState Perl.