linux的svn无法安装目录,linux下svn安装(ra_dav无法装载之解决办法)

subversion编译安装

April 29, 2009 by admin · Leave a Comment

Filed under: program

subversion(svn)是很好的版本管理工具,但如果手动编译安装,真的是非常麻烦的事情。

subversion有三个最常用的模块:

* ra_svn : 使用svn网络协议访问档案库的模块。

- handles ’svn’ scheme

* ra_local : 访问本地磁盘的档案库模块。

* ra_dav : 访问http://档案库模块。

前面两个,是subversion编译的默认模块,ra_dav是大多数人遇到的问题。如果ra_dav没有编译到系统中,当你从http://这样的路径checkout时,会出现这样的错误提示:

svn: Unrecognized URL scheme

那么,如何编译ra_dav呢?你至少需要越过以下几道关卡:

1、ra_dav是由一个叫neon的软件完成的,你需要安装neon。

2、重新configure subversion

这一步非常重要,稍不小心,就可能会找不到neon,即使你已经安装neon,即使你已经将neon的源代码加压到subversion的目录下,即使你已经把neon-0.28.4改名为neon目录。

configure

subversion有一个很不爽的地方就是,当你configure配置了neon,但configure失败的时候,它不会把这个结果在执行完单独列出来,而是在configure的输出过程中显示,让人误以为configure

ok,其实,neon并没有被configure进去。

在我编译subversion 1.6.1版本中,neon失败的输出为:

configure: checking neon library

An appropriate version of neon could not be found, so

libsvn_ra_neon

will not be built.  If you want to build

libsvn_ra_neon, please either

install neon 0.28.4 on this system

or

get neon 0.28.4 from:

http://www.webdav.org/neon/neon-0.28.4.tar.gz

unpack the archive using tar/gunzip and rename the resulting

directory from ./neon-0.28.4/ to ./neon/

我之前尝试了多种configure的方法,例如:

./configure –prefix=/usr/ –with-apr=/usr/bin/apr-1-config

–with-apr-util=/usr/bin/apu-1-cfig –with-neon=/usr/bin/neon-config

–with-zlib=/lib –with-apache-libexecdir

–with-apxs=/usr/sbin/apxs

或者把neon解压到当前目录,并改名为neon,configure如下:

./configure –prefix=/usr/ –with-apr=/usr/bin/apr-1-config

–with-apr-util=/usr/bin/apu-1-cfig –with-neon=./neon

–with-zlib=/lib –with-apache-libexecdir

–with-apxs=/usr/sbin/apxs

这两种configure方式都会导致neon

无法作为subversion的编译选项,正确的configure方法是–with-neon后不加参数,这个subversion的configure也真是够贱的!

./configure –prefix=/usr/ –with-apr=/usr/bin/apr-1-config

–with-apr-util=/usr/bin/apu-1-cfig –with-neon=

–with-zlib=/lib –with-apache-libexecdir

–with-apxs=/usr/sbin/apxs

这一步完成后,make && make

install就没有问题了。

安装完成后,使用svn –admin来验证:

# svn –version

svn, version 1.6.1 (r37116)

compiled Apr 29 2009,

10:56:22

Copyright (C) 2000-2009 CollabNet.

Subversion is open source software, see

http://subversion.tigris.org/

This product includes software developed by CollabNet

(http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV

protocol using Neon.

- handles ‘http’ scheme

* ra_svn : Module for accessing a repository using the svn

network protocol.

- handles ’svn’ scheme

* ra_local : Module for accessing a repository on local

disk.

- handles ‘file’ scheme

另外在按上面方法进行解决的时候发现问题:

当把neon解压到当前目录,并改名为neon后,configure如下:

./configure –prefix=/usr/ –with-apr=/usr/bin/apr-1-config

–with-apr-util=/usr/bin/apu-1-cfig –with-zlib=/lib

–with-apache-libexecdir

–with-apxs=/usr/sbin/apxs就可以了,无需指定neon。大家在configure的时候看有没有找到neon如果找到,就肯定没有问题了。

另外关于make时遇到fPCI的问题,请把neon/src/下的Makefile里的CFLAGS= -g

-02改为CFLAGS= -fPIC -g -02

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值