Centos 7 安装 subversion 新版本

使用 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 system

or

get 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-amalgamation

configure: 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-gnu

Copyright (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' scheme

The following authentication credential caches are available:

* GPG-Agent

看到这个就表示安装成功了.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值