linux安装subversion

来源:互联网 发布:淘宝店铺发布宝贝草稿 编辑:程序博客网 时间:2024/05/22 13:45

安装步骤

1. 下载subversion

到官网http://subversion.apache.org/下载subversion-1.6.12.tar.bz2 和 subversion-deps-1.6.12.tar.bz2 。前者是 svn的源文件,后者是编译时可能需要用到的包。

 

2. 解压这两个文件(这两个自动解压成一个包):

 

Java代码  收藏代码
  1. tar jxvf subversion-1.6.12.tar.bz2  
  2. tar jxvf subversion-deps-1.6.12.tar.bz2  

 

 

3. 安装subversion

 

Java代码  收藏代码
  1. cd subversion-1.6.12  
  2. ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-ssl --with-zlib=/usr/local/lib --enable-maintainer-mode  
  3. make  
  4. make install  

注意:可能会出现以下错误:

 

Java代码  收藏代码
  1. configure: WebDAV support is enabled  
  2. checking expat.h usability... no  
  3. checking expat.h presence... no  
  4. checking for expat.h... no  
  5. checking for xml2-config... no  
  6. configure: error: no XML parser was found: expat or libxml 2.x required  
  7. configure failed for neon  

   检查是否安装 expat2 如果没有请在http://sourceforge.net/projects/expat/files/下载最新expat-2.0.1.tar.gz。

 

安装expat命令如下:

 

Java代码  收藏代码
  1. tar zxvf expat-2.0.1.tar.gz  
  2. cd expat-2.0.1  
  3. ./configure  
  4. make  
  5. make install  

  如果还依然出现以下2行错误

 

Java代码  收藏代码
  1. > checking for xml2-config... no  
  2. > configure: error: no XML parser was found: expat or libxml 2.x required  
  3.   
  4. 是由于neon没有安装   
  5. cd /usr/local/subversion-1.5.0/neon  
  6. ./configure --with-ssl  
  7. make  
  8. make install  
 

 

如果安装过程中出现了问题2/3,就安装libssl-dev和libxml2-dev包

Java代码  收藏代码
  1. sudo apt-get install libssl-dev libxml2-dev  
 

 

如果出现以下错误:

 

Java代码  收藏代码
  1. configure: error: with-zlib requires an argument  

那是因为你没有指定路径--with-zlib=/usr/local/lib 其中/usr/local/lib为默认路径

 

 

 

 

./configure LDFLAGS="-L/usr/lib64 -L/lib64" --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-ssl --with-zlib=/usr/local/lib -with-openssl=/usr/local/ssl  --with-libs=/usr/local/ssl --enable-maintainer-mod --without-serf

0 0
原创粉丝点击