1. 下载软件包
http://archive.apache.org/dist/subversion/
http://archive.apache.org/dist/subversion/subversion-1.6.9.tar.gz
http://archive.apache.org/dist/subversion/subversion-deps-1.6.9.tar.gz
http://www.openssl.org/source/openssl-1.0.0a.tar.gz
http://www.openssl.org/source/old/1.0.0/
2. 安装openssl
解决OpenSSL缺失
错误信息:configure: error: We require OpenSSL; try --with-openssl
cd /usr/local wget http://www.openssl.org/source/openssl-1.0.0a.tar.gz tar -zxvf openssl-1.0.0a.tar.gz cd openssl-1.0.0a ./config ./config -t make depend make make test make install
3. 安装zlib
解决zlib依赖缺失
错误信息:configure: error: subversion requires zlib
cd /usr/local wget http://zlib.net/zlib-1.2.5.tar.gz tar -xvzf zlib-1.2.5.tar.gz cd zlib-1.2.5 ./configure make make install cd /usr/local ln -s zlib-1.2.5 zlib
4. 安装svn
#下载 wget http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz wget http://subversion.tigris.org/downloads/subversion-deps-1.6.9.tar.gz #解压 放在一个目录下解压,否则会报错:configure: error: no suitable apr found tar zxvf subversion-1.6.9.tar.gz tar zxvf subversion-deps-1.6.9.tar.gz #编译 mkdir /usr/local/svn cd subversion-1.6.9 ./configure --prefix=/usr/local/svn --with-openssl=/usr/local/ssl --with-zlib=/usr/local/zlib --without-berkeley-db #执行make clean,否则会报错--libtool: install: error: cannot install `libaprutil-1.la‘ to a directory not ending in /usr/local/apr/lib make cleanmake make install
5. 环境配置
ln -s /usr/local/svn/bin/svn /usr/local/bin/svn #或者配置环境变量 vim ~/.bashrc SVN_HOME=/usr/local/svn PATH=$SVN_HOME/bin:$PATH #生效 source ~/.bashrc
时间: 2024-10-14 04:40:02