使用 Centos yum repo 安装的 svn
版本是 1.7
但是现在需要更新的版本, 因为出现错误了:
svn: E155021: This client is too old to work with the working copy at
使用官网下载的包进行安装
1. 下载 .tar.gz
包
wget https://dlcdn.apache.org/subversion/subversion-1.14.3.tar.gz --no-check-certificate
tar -zxvf subversion-1.14.3.tar.gz
2. 安装
./configure --prefix=/usr/local/subversion --with-utf8proc=internal
sudo make
sudo make install
安装遇到的问题
1. 如果提示 APR
相关的错误
checking for APR... no
configure: WARNING: APR not found
The Apache Portable Runtime (APR) library cannot be found.
Please install APR on this system and configure Subversion
with the appropriate --with-apr option.You probably need to do something similar with the Apache
Portable Runtime Utility (APRUTIL) library and then configure
Subversion with both the --with-apr and --with-apr-util options.configure: error: no suitable APR found
处理:
sudo yum install -y apr-devel apr-util-devel
2. 如果遇到 sqlite
的错误
User
An appropriate version of sqlite could not be found. We recommmend
3.8.11.1, but require at least 3.8.2.
Please either install a newer sqlite on this systemorget the sqlite 3.8.11.1 amalgamation from:https://www.sqlite.org/2015/sqlite-amalgamation-3081101.zip
unpack the archive using unzip and rename the resulting
directory to:
/mnt/disk1t/ubuntu/applications/subversion-1.14.3/sqlite-amalgamationconfigure: error: Subversion requires SQLite
解决:
下载新版本的 sqlite
并且解压后放在 subversion
安装包里
wget https://www.sqlite.org/2015/sqlite-amalgamation-3081101.zip
unzip sqlite-amalgamation-3081101.zip
mv sqlite-amalgamation-3081101 subversion-1.14.3/sqlite-amalgamation
3. 如果遇到 LZ4
的错误
configure: zlib library configuration via pkg-config
checking for zlib library... yes
checking for lz4 library via pkg-config... no
configure: lz4 configuration without pkg-config
checking for LZ4_compress_default in -llz4... no
configure: error: Subversion requires LZ4 >= r129, or use --with-lz4=internal
解决:
sudo yum install lz4 lz4-devel
你不一定会遇到上面的问题, 每解决一个就尝试安装步骤
如果安装过程中没有报错, 则安装成功, 但是安装成功, 确没有 svn
命令.
原因是 svn
安装目录是 /usr/local/subversion
, 它的 bin
目录并不在 PATH
中.
解决:
sudo ln -s /usr/local/subversion/bin/svn /bin/svn
查看 svn
版本:
> svn --version
svn, version 1.14.3 (r1914484)compiled May 6 2024, 07:20:17 on x86_64-unknown-linux-gnuCopyright (C) 2023 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/The following repository access (RA) modules are available:* ra_svn : Module for accessing a repository using the svn network protocol.- with Cyrus SASL authentication- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.- handles 'file' schemeThe following authentication credential caches are available:* GPG-Agent
看到这个就表示安装成功了.