Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include other folders within the @INC for Perl? (Was: `Can't locate Git.pm in @INC` for svn2git)

I am attempting to import an svn repo into git via svn2git. When I run svn2git --verbose https://url_to_repo I end up getting the following output:

Running command: git svn init --prefix=svn/ --no-metadata --trunk=trunk --tags=tags --branches=branches https://url_for_repository
Can't locate Git.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8 /home/cpdirect/perl5/lib/perl5 /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /usr/libexec/git-core/git-svn line 80.
BEGIN failed--compilation aborted at /usr/libexec/git-core/git-svn line 80.
command failed:
2>&1 git svn init --prefix=svn/ --no-metadata --trunk=trunk --tags=tags --branches=branches https://url_for_repository

It is obvious that Perl is unable to find the module within the path, however everything I've tried so far on CentOS 5.9 has not yielded results. For example, the following are installed:

git-1.7.11.3-1.el5.rf
git-svn-1.7.11.3-1.el5.rf
cpanel-git-1.7.11.3-1.cp1136

Any ideas of how to resolve this issue?

So it turns out that for some reason Perl doesn't know how to look at /usr/lib/perl5/vendor_perl/5.8.8/. If I make links to every module that it needs within /usr/lib/perl5/site_perl/5.8.8 it works seemingly fine and without error.

So the real question here is HOW do you force Perl to look under that vendor_perl folder?

like image 870
ylluminate Avatar asked Nov 12 '22 07:11

ylluminate


1 Answers

So I've discovered how to add multiple libs and it solves the missing Perl libs:

PERL5LIB="/usr/lib/perl5/vendor_perl/5.8.8/:/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi" svn2git -v file:///my/path/to/svn/repo
like image 196
ylluminate Avatar answered Nov 15 '22 05:11

ylluminate