threads / discuss / 29540

Installing git-svn on Linux without root

Subject: Installing git-svn on Linux without root

## tl;dr

3 messages between Feb 4, 2012 and Feb 5, 2012.

replies: 2people: 2as markdown or json

Andrew Keller· Feb 4, 2012, 02:10 UTC · lore
I am attempting to install git, including the ability to access subversion repositories on a Linux machine.  I do not have root access on the machine, so I prepended my PATH with a folder in my home directory.
Installing Git worked just fine, but when I try to clone a subversion repository, I get:

$ git svn clone file:///svn --prefix=svn/ --no-metadata --trunk=dba/trunk --branches=dba/branches --tags=dba/tags dba Initialized empty Git repository in /home/kelleran/Documents/togit/converted/dba/.git/ Can't locate SVN/Core.pm in @INC (@INC contains: /homedirs/kelleran/local/lib/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /homedirs/kelleran/local/libexec/git-core/git-svn line 41.

Google suggested that the above error could be due to missing perl bindings.  So, I installed swig, and followed the instructions for installing the perl bindings: http://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/swig/INSTALL (I used the alternate build steps, since I had to set the prefix).
Unfortunately, I still get exactly the same error.  So, I looked to see whether or not the missing library was installed:

$ find ~/local -iname Core.pm /homedirs/kelleran/local/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/SVN/Core.pm

So, the module does exist, but not in a location included by @INC.  This sounds like a simple misconfiguration during the installation on my part, but after reading the manuals and searching the web, I was unable to find a parameter that gets git to be able to see the perl bindings.
I'm guessing I need either more sleep or a fresh point of view.  Any thoughts?
The machine is running Linux 2.6.32 64-bit, and has perl 5.8.8.  Of the software I installed, I am using:
  libpcre 8.21
  swig 2.8.4
  neon 0.29.6
  apr 1.3.x
  apr-util 1.3.x
  subversion 1.7.2
  git 1.7.9

Thanks, Andrew Keller

Jakub Narebski· Feb 4, 2012, 11:32 UTC · re: Andrew Keller · lore

Re: Installing git-svn on Linux without root

Andrew Keller <andrew@kellerfarm.com> writes:
Show 25 quoted lines
> I am attempting to install git, including the ability to access
> subversion repositories on a Linux machine.  I do not have root
> access on the machine, so I prepended my PATH with a folder in my
> home directory.
> 
> Installing Git worked just fine, but when I try to clone a
> subversion repository, I get:
> 
> $ git svn clone file:///svn --prefix=svn/ --no-metadata --trunk=dba/trunk --branches=dba/branches --tags=dba/tags dba
> Initialized empty Git repository in /home/kelleran/Documents/togit/converted/dba/.git/
> Can't locate SVN/Core.pm in @INC (@INC contains: /homedirs/kelleran/local/lib/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /homedirs/kelleran/local/libexec/git-core/git-svn line 41.
> 
> Google suggested that the above error could be due to missing perl
> bindings.  So, I installed swig, and followed the instructions for
> installing the perl bindings:
> http://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/swig/INSTALL
> (I used the alternate build steps, since I had to set the prefix).
> 
> Unfortunately, I still get exactly the same error.  So, I looked to
> see whether or not the missing library was installed:
> 
> $ find ~/local -iname Core.pm
> /homedirs/kelleran/local/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/SVN/Core.pm
> 
> So, the module does exist, but not in a location included by @INC.
>From the above error message it looks like
  /homedirs/kelleran/local/lib/perl5/site_perl/5.8.8
is in @INC, but
  /homedirs/kelleran/local/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/
is not.  Strange.
Do you use local::lib?
> This sounds like a simple misconfiguration during the installation
> on my part, but after reading the manuals and searching the web, I
> was unable to find a parameter that gets git to be able to see the
> perl bindings.
Add missing directory to PATH-like PERL5LIB environment variable
before running git-svn.
 
-- 
Jakub Narebski
Jakub Narebski· Feb 5, 2012, 10:11 UTC · lore

Re: Installing git-svn on Linux without root

Andrew Keller wrote:
> On Feb 4, 2012, at 6:32 AM, Jakub Narebski wrote:
> > Andrew Keller <andrew@kellerfarm.com> writes:
Show 14 quoted lines
> > > So, the module does exist, but not in a location included by @INC.
> > 
> > From the above error message it looks like
> > 
> >  /homedirs/kelleran/local/lib/perl5/site_perl/5.8.8
> > 
> > is in @INC, but
> >  /homedirs/kelleran/local/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/
> > 
> > is not.  Strange.
> > 
> > Do you use local::lib?
> 
> No - Where should I use it?

local::lib is a way to install Perl modules / packages e.g. in your home directory. Please read and follow the instructions on local::lib manpage ("The bootstrapping technique" section):

  http://search.cpan.org/~apeiron/local-lib-1.008004/lib/local/lib.pm

Then you can install Alien::SVN (or any other Perl package) using 'cpan' client (or intstall 'cpanm' / 'App::cpanminus').

HTH
-- 
Jakub Narebski
Poland

← back to recent threads