KUbuntu/Ubuntu 14.04 (降级)安装 SVN 1.7&&Ubuntu14.10安装subversion1版本

Reference:

https://archive.apache.org/dist/subversion/

http://www.2cto.com/os/201501/369067.html

http://www.68idc.cn/help/server/linux/20141227150488.html

Ubuntu14.10安装subversion版本

安装了ubuntu-14.10版本后发现默认安装subversion 1.8. 而1.8版本与目前XP上使用的1.6版本无法兼容,网上搜索了下发现使用1.8版本的人并不多,为了避免开发环境切换带来的开销,暂不想将XP下也升级到1.8. 那只能ubuntu上安装1.6.


1.下载subversion-1.6.17.tar.gz
http://download.csdn.net/detail/sunwill_chen/8354589


2.下载subversion-deps-1.6.17.tar.bz2
http://download.csdn.net/detail/sunwill_chen/8354593


3.#apt-get install gcc make libssl-dev libexpat1-dev


4.#tar xvf subversion-1.6.17.tar.gz


5.#tar xvf subversion-deps-1.6.17.tar.bz2


6.#cd subversion-1.6.17


7.#./configure


8.#make && make install


9.#ln -s /usr/lib/i386-linux-gnu/libexpat.so /usr/lib/i386-linux-gnu/libexpat.so.0


10.查看svn版本号:
# svn --version
svn, version 1.6.17 (r1128011)
compiled Jan 12 2015, 20:05:45


问题:
1.configure: error: no XML parser was found: expat or libxml 2.x required

解决:apt-get install libxml2-dev
(注: 这个可以不需要安装,后面安装了libexpat1-dev才真正起作用)


2.make最后出现错误:

/home/tools/subversion-1.6.17/subversion/libsvn_ra_neon/.libs/libsvn_ra_neon-1.so: undefined reference to `xmlFreeParserCtxt'
/home/tools/subversion-1.6.17/subversion/libsvn_ra_neon/.libs/libsvn_ra_neon-1.so: undefined reference to `xmlParseChunk'
/home/tools/subversion-1.6.17/subversion/libsvn_ra_neon/.libs/libsvn_ra_neon-1.so: undefined reference to `xmlCreatePushParserCtxt'
collect2: error: ld returned 1 exit status
解决:经过分析代码发现没有EXPAT才会有这个问题,因为安装expat, 
#apt-get install libexpat1-dev


3.运行svn发现库链接错误,
svn: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
解决:使用dpkg -L libexpat1-dev安装在哪个目录,一看没有这个文件,做个软链接即可。
#ln -s /usr/lib/i386-linux-gnu/libexpat.so /usr/lib/i386-linux-gnu/libexpat.so.0



KUbuntu/Ubuntu 14.04 (降级)安装 SVN 1.7


Step 1: 增加源到 source.list

sudo add-apt-repository "deb http://extras.ubuntu.com/ubuntu saucy main"

sudo add-apt-repository "deb http://de.archive.ubuntu.com/ubuntu/ saucy main universe restricted multiverse"


Step 2: 删除 svn 1.8 package

sudo apt-get remove subversion libsvn1


Step 3: 更新源

sudo apt-get update


Step 4: 安装 svn 1.7

sudo apt-get install subversion=1.7.9-1+nmu6ubuntu3 libsvn1=1.7.9-1+nmu6ubuntu3 subversion-tools=1.7.9-1+nmu6ubuntu3


Step 5: 锁定 SVN to 1.7 to 防止自动升级

echo subversion hold | sudo dpkg --set-selections

echo libsvn1 hold | sudo dpkg --set-selections

echo libserf1 hold | sudo dpkg --set-selections


Step 6: 从源sources.list中移除 Step 1 增加的行

sudo gedit /etc/apt/sources.list

移除:deb http://extras.ubuntu.com/ubuntu saucy main

移除:deb http://de.archive.ubuntu.com/ubuntu/ saucy main universe restricted multiverse


Step 7: 更新源

sudo apt-get update


Step 8: 查看svn版本

svn --version

~$ svn --version
svn,版本 1.7.9 (r1462340)
编译于 Oct 15 2013,12:40:34

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

可使用以下的版本库访问模块:

* ra_neon : 通过 WebDAV 协议使用 neon 访问版本库的模块。
- 处理“http”方案
- 处理“https”方案
* ra_svn : 使用 svn 网络协议访问版本库的模块。  - 使用 Cyrus SASL 认证
- 处理“svn”方案
* ra_local : 访问本地磁盘的版本库模块。
- 处理“file”方案
* ra_serf : 通过 WebDAV 协议使用 serf 访问版本库的模块。
- 处理“http”方案
- 处理“https”方案


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值