[Error scenario]
The group will migrate the code from the svn server to git as a whole, ready for two steps.
The first step is to convert git svn into git warehouse.
The second step is to submit the git repository to the git server.
It was a happy thing, but the brave man had trouble buying equipment and made a mistake in git svn. The devil can only wait a little longer.
Operating system:
[counsellor@localhost git]$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
git version:
[counsellor@localhost git]$ git --version
git version 2.12.0
svn version:
[counsellor@localhost git]$ svn --version
svn, version 1.9.4 (r1740329)
compiled Jul 14 2016, 12:41:14 on x86_64-redhat-linux-gnu
perl version:
[counsellor@localhost git]$ perl --version
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 29 registered patches, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Error prompt:
cmd> git svn clone https://svn.xxxxxx.com/svn/myrepo --username=admin --no-metadata --authors-file=users.txt myrepo
Can't locate SVN/Core.pm in @INC (@INC contains: /usr/local/share/perl5 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /usr/local/share/perl5/Git/SVN.pm line 32.
BEGIN failed--compilation aborted at /usr/local/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /usr/local/libexec/git-core/git-svn line 21.
BEGIN failed--compilation aborted at /usr/local/libexec/git-core/git-svn line 21.
[Solutions]
yum install subversion-perl
[Problem analysis]
Find the first scene of the error first:
/usr/local/share/perl5/Git/SVN/Utils.pm line 6
Look at the code:
package Git::SVN::Utils;
use strict;
use warnings;
use SVN::Core;
You can see that it is use SVN::Core; when calling the SVN module, the Perl code prompts that the SVN module cannot be found. So there is no svn-related Library in perl, just install it.