While attempting to get an old svn dump of a project under git control, I ran into an interesting problem. Whenever I run git svn
, I get an error saying it isn
On CentOS I used
sudo yum install git-svn
Under my system I've had this trouble:
$ git svn
Can't locate SVN/Core.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/5.10.0/i486-linux-thread-multi
/usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl/5.10.0/i486-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.10.0/i486-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl .) at
/usr/libexec/git-core/git-svn line 29.
because I don't have Subversion Perl bindings installed. Try installing them and running the command again.
I had the same error under Cygwin 1.7. It was solved by installing the git-svn package with Cygwin setup.
Had a similar problem on RHEL6, i.e.,
Can't locate Git/SVN.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/libexec/git-core/git-svn line 25.
My solution:
sudo yum install subversion-perl
chmod 755 /usr/local/share/perl5/ (and sub dirs, as they were only readable by root)
I just check on my newly installed ubuntu box and it wasn't installed even with git-core installed. A simple:
sudo apt-get install git-svn
or your distro equivalent should fix it.
MacPorts version:
port install git +svn
(Note: you likely need to port deactivate git
first)