无root权限安装git-svn方法

tar -xvf git-2.9.4.tar.gz

cd git-2.9.4/

./configure help

./configure --prefix=$HOME/usr/git-2.9.4

make –j64

make install

vi ~/.profile

PATH=$HOME/usr/git-2.9.4/bin:$PATH

source ~/.profile

 

git –version

git version 2.9.4

git svn svn://10.118.1.89/MT5510/trunk/src/release

 

Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /home/kangde/usr/git-2.9.4/share/perl/5.18.2 /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/p

erl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /home/kangde/usr/git-2.9.4/share/perl/5.18.2/Git/SVN/Utils.pm line 6.

BEGIN failed--compilation aborted at /home/kangde/usr/git-2.9.4/share/perl/5.18.2/Git/SVN/Utils.pm line 6.

Compilation failed in require at /home/kangde/usr/git-2.9.4/share/perl/5.18.2/Git/SVN.pm line 32.

BEGIN failed--compilation aborted at /home/kangde/usr/git-2.9.4/share/perl/5.18.2/Git/SVN.pm line 32.

Compilation failed in require at /home/kangde/usr/git-2.9.4/libexec/git-core/git-svn line 21.

BEGIN failed--compilation aborted at /home/kangde/usr/git-2.9.4/libexec/git-core/git-svn line 21.

 

 

 

tar -xvf perl-5.26.0.tar.gz

cd perl-5.26.0/

./Configure –help (注意Configure 首字母大写,平时一般是小写的)

./Configure -de -Dprefix=$HOME/usr/perl-5.26.0 -Dusethreads

make –j64

make install

vi ~/.profile

PATH=$HOME/usr/perl-5.26.0/bin:$PATH

source ~/.profile

perl –version

This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-thread

 

 

./configure --prefix=$HOME/usr/git-2.9.4 --with-perl=$HOME/usr/perl-5.26.0/bin

make[1]: execvp: /home/kangde/usr/perl-5.26.0/bin: Permission denied

./configure --prefix=$HOME/usr/git-2.9.4 --with-perl=$HOME/usr/perl-5.26.0/bin/perl

 

Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /home/kangde/usr/git-2.9.4/lib/site_perl/5.26.0/x86_64-linux /home/kangde/usr/git-2.9.4/lib/site_perl/5.26.0 /home/kangde/usr/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux /home/kangde/usr/perl-5.26.0/lib/site_perl/5.26.0 /home/kangde/usr/perl-5.26.0/lib/5.26.0/x86_64-linux /home/kangde/usr/perl-5.26.0/lib/5.26.0) at /home/kangde/usr/git-2.9.4/lib/site_perl/5.26.0/Git/SVN/Utils.pm line 6.

BEGIN failed--compilation aborted at /home/kangde/usr/git-2.9.4/lib/site_perl/5.26.0/Git/SVN/Utils.pm line 6.

Compilation failed in require at /home/kangde/usr/git-2.9.4/lib/site_perl/5.26.0/Git/SVN.pm line 32.

BEGIN failed--compilation aborted at /home/kangde/usr/git-2.9.4/lib/site_perl/5.26.0/Git/SVN.pm line 32.

Compilation failed in require at /home/kangde/usr/git-2.9.4/libexec/git-core/git-svn line 21.

BEGIN failed--compilation aborted at /home/kangde/usr/git-2.9.4/libexec/git-core/git-svn line 21.

因为perl没有SVN::Core模块

tar -xvf Alien-SVN-v1.8.11.0.tar.gz

tar -xvf Module-Build-0.4224.tar.gz

unzip sqlite-amalgamation-3071501.zip

 

 

http://www.bio-info-trainee.com/2451.html

 

perl -MCPAN -e shell

cpan>install SVN::Core

 

An appropriate version of sqlite could not be found. We recommmend

3.7.15.1, but require at least 3.7.12.

Please either install a newer sqlite on this system

 

or

 

get the sqlite 3.7.15.1 amalgamation from:

http://www.sqlite.org/sqlite-amalgamation-3071501.zip

unpack the archive using unzip and rename the resulting

directory to:

/home/kangde/.cpan/build/Alien-SVN-v1.8.11.0-0/src/subversion/sqlite-amalgamation

 

 

把sqlite-amalgamation-3071501.zip解压并且复制至

Alien-SVN-v1.8.11.0-0/src/subversion/sqlite-amalgamation

perl Build.PL

./Build

./Build install

 

kangde@vmtcl:~/tools/Alien-SVN-v1.8.11.0$ ./Build install

Running make install-lib

cd subversion/libsvn_ra_serf && /bin/bash /home/kangde/tools/Alien-SVN-v1.8.11.0/src/subversion/libtool --tag=CC --silent --mode=link gcc -g -O2 -pthread -rpath /home/kangde/usr/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux-thread-multi/Alien/SVN -version-info 0 -Wl,--no-undefined -o libsvn_ra_serf-1.la blame.lo blncache.lo commit.lo get_deleted_rev.lo getdate.lo getlocations.lo getlocationsegments.lo getlocks.lo inherited_props.lo locks.lo log.lo merge.lo mergeinfo.lo options.lo property.lo replay.lo sb_bucket.lo serf.lo update.lo util.lo util_error.lo xml.lo ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la -laprutil-1 -lapr-1 -L/usr/local/lib -lserf-1 -lexpat

.libs/util.o: In function `setup_serf_req':

/home/kangde/tools/Alien-SVN-v1.8.11.0/src/subversion/subversion/libsvn_ra_serf/util.c:860: undefined reference to `serf_bucket_request_set_CL'

/home/kangde/tools/Alien-SVN-v1.8.11.0/src/subversion/subversion/libsvn_ra_serf/util.c:858: undefined reference to `serf_bucket_request_set_CL'

collect2: ld returned 1 exit status

make: *** [subversion/libsvn_ra_serf/libsvn_ra_serf-1.la] Error 1

installing libs failed at inc/My/SVN/Builder.pm line 174.

要安装serf-1.3.9.tar.bz2

tar -xvf serf-1.3.9.tar.bz2

cd serf-1.3.9

vi README 查看安装方法

(一看,又要安装一大堆东西。到这里快崩溃了吗,快放弃了吗,是不是感觉花这么大力气,还不一定成功,没有意义。不要灰心,坚持。)

 

mkdir scons-local-2.3.0

tar -xvf scons-local-2.3.0.tar.gz -C scons-local-2.3.0

ln -s ~/usr/scons-local-2.3.0/scons.py scons

 

./configure --prefix=$HOME/usr/apr-1.6.2

make -j8

make install

vi ~/.profile

PATH=$HOME/usr/apr-1.6.2/bin:$PATH

source ~/.profile

 

 

 

 

 

./configure --prefix=$HOME/usr/apr-util-1.6.0 --with-apr=$HOME/usr/apr-1.6.2/bin

make -j8

make install

vi ~/.profile

PATH=$HOME/usr/apr-util-1.6.0/bin:$PATH

source ~/.profile

 

tar -xvf openssl-1.0.2l.tar.gz

cd openssl-1.0.2l

./config –prefix=$HOME/usr/ openssl-1.0.2l

make –j8

make install

vi ~/.profile

PATH=$HOME/usr/openssl-1.0.2l/bin:$PATH

source ~/.profile

 

scons APR=$HOME/usr/apr-1.6.2 APU=$HOME/usr/apr-util-1.6.0 OPENSSL=$HOME/usr/openssl-1.0.2l/bin PREFIX=$HOME/usr/serf-1.3.9

 

scons install

vi ~/.profile

LD_LIBRARY_PATH=$HOME/usr/serf-1.3.9/lib:$LD_LIBRARY_PATH(LD_LIBRARY_PATH这个是linux找so库的路径)

export LD_LIBRARY_PATH

source ~/.profile

 

cd Alien-SVN-v1.8.11.0/src/subversion

./configure --libdir=/home/kangde/usr/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux-thread-multi/Alien/SVN --prefix=/home/kangde/usr/perl-5.26.0 PERL=/home/kangde/usr/perl-5.26.0/bin/perl --with-serf=$HOME/usr/serf-1.3.9

 

make –j8

make install

 

 

 

 

 

vi inc/My/SVN/Builder.pm +101

增加一行 '--with-serf' => '$HOME/usr/serf-1.3.9',

如下:

 

 

sub _default_configure_args {

my $self = shift;

 

my $props = $self->{properties};

my $prefix = $props->{install_base} ||

$props->{prefix} ||

$Config{siteprefix};

 

my %args = (

'--prefix' => $prefix,

'--libdir' => File::Spec->catdir(

$self->install_destination('arch'), 'Alien', 'SVN'

),

PERL => $^X,

'--with-serf' => '$HOME/usr/serf-1.3.9',

);

 

return join ' ', map { "$_=$args{$_}" } sort keys %args;

}

 

 

 

 

perl Build.PL

./Build

./Build install

 

LD_LIBRARY_PATH=$HOME/usr/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux-thread-multi/Alien/SVN:$LD_LIBRARY_PATH

 

export LD_LIBRARY_PATH

 

git svn clone svn://10.118.1.89/MT5510/trunk/src/release

所有安装包,打包上传百度网盘,如下

链接:https://pan.baidu.com/s/1pNge8if 密码:xyna


你可能感兴趣的:(无root权限安装git-svn方法)